Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,9 +14,6 @@ import sys
|
|
| 14 |
import tempfile
|
| 15 |
from typing import Sequence, Mapping, Any, Union
|
| 16 |
import asyncio
|
| 17 |
-
import execution
|
| 18 |
-
from nodes import init_extra_nodes
|
| 19 |
-
import server
|
| 20 |
|
| 21 |
# Copy functions from FluxSimpleUpscaler.txt
|
| 22 |
def get_value_at_index(obj: Union[Sequence, Mapping], index: int) -> Any:
|
|
@@ -58,13 +55,13 @@ def add_extra_model_paths() -> None:
|
|
| 58 |
def import_custom_nodes() -> None:
|
| 59 |
import asyncio
|
| 60 |
import execution
|
| 61 |
-
from nodes import
|
| 62 |
import server
|
| 63 |
loop = asyncio.new_event_loop()
|
| 64 |
asyncio.set_event_loop(loop)
|
| 65 |
server_instance = server.PromptServer(loop)
|
| 66 |
execution.PromptQueue(server_instance)
|
| 67 |
-
|
| 68 |
|
| 69 |
# Setup ComfyUI and custom nodes
|
| 70 |
if not os.path.exists("ComfyUI"):
|
|
@@ -282,11 +279,11 @@ def enhance_image(
|
|
| 282 |
|
| 283 |
return [resized_input, image]
|
| 284 |
|
| 285 |
-
with gr.Blocks(css=css, title="🎨
|
| 286 |
gr.HTML("""
|
| 287 |
<div class="main-header">
|
| 288 |
-
<h1>🎨
|
| 289 |
-
<p>Upload an image or provide a URL to upscale it using FLUX FP8 with
|
| 290 |
<p>Using FLUX.1-dev FP8 model</p>
|
| 291 |
</div>
|
| 292 |
""")
|
|
|
|
| 14 |
import tempfile
|
| 15 |
from typing import Sequence, Mapping, Any, Union
|
| 16 |
import asyncio
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
# Copy functions from FluxSimpleUpscaler.txt
|
| 19 |
def get_value_at_index(obj: Union[Sequence, Mapping], index: int) -> Any:
|
|
|
|
| 55 |
def import_custom_nodes() -> None:
|
| 56 |
import asyncio
|
| 57 |
import execution
|
| 58 |
+
from nodes import init_custom_nodes
|
| 59 |
import server
|
| 60 |
loop = asyncio.new_event_loop()
|
| 61 |
asyncio.set_event_loop(loop)
|
| 62 |
server_instance = server.PromptServer(loop)
|
| 63 |
execution.PromptQueue(server_instance)
|
| 64 |
+
init_custom_nodes()
|
| 65 |
|
| 66 |
# Setup ComfyUI and custom nodes
|
| 67 |
if not os.path.exists("ComfyUI"):
|
|
|
|
| 279 |
|
| 280 |
return [resized_input, image]
|
| 281 |
|
| 282 |
+
with gr.Blocks(css=css, title="🎨 Flux Image Upscaler") as demo:
|
| 283 |
gr.HTML("""
|
| 284 |
<div class="main-header">
|
| 285 |
+
<h1>🎨 Flux Image Upscaler</h1>
|
| 286 |
+
<p>Upload an image or provide a URL to upscale it using FLUX FP8 with Ultimate SD Upscale</p>
|
| 287 |
<p>Using FLUX.1-dev FP8 model</p>
|
| 288 |
</div>
|
| 289 |
""")
|