comrender commited on
Commit
5cb38cd
·
verified ·
1 Parent(s): f6368ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
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 init_extra_nodes
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
- init_extra_nodes()
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="🎨 AI Image Upscaler - FLUX ComfyUI") as demo:
286
  gr.HTML("""
287
  <div class="main-header">
288
- <h1>🎨 AI Image Upscaler (ComfyUI Workflow)</h1>
289
- <p>Upload an image or provide a URL to upscale it using FLUX FP8 with ComfyUI Ultimate SD Upscale</p>
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
  """)