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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -55,13 +55,13 @@ def add_extra_model_paths() -> None:
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"):
@@ -92,7 +92,7 @@ if not os.path.exists(t5_path):
92
 
93
  vae_path = "ComfyUI/models/vae/ae.safetensors"
94
  if not os.path.exists(vae_path):
95
- hf_hub_download("black-forest-labs/FLUX.1-dev", "ae.safetensors", subfolder="vae", local_dir="ComfyUI/models/vae")
96
 
97
  esrgan_x2_path = "ComfyUI/models/upscale_models/RealESRGAN_x2.pth"
98
  if not os.path.exists(esrgan_x2_path):
@@ -279,11 +279,11 @@ def enhance_image(
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
  """)
 
55
  def import_custom_nodes() -> None:
56
  import asyncio
57
  import execution
58
+ from nodes import init_extra_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_extra_nodes()
65
 
66
  # Setup ComfyUI and custom nodes
67
  if not os.path.exists("ComfyUI"):
 
92
 
93
  vae_path = "ComfyUI/models/vae/ae.safetensors"
94
  if not os.path.exists(vae_path):
95
+ hf_hub_download("black-forest-labs/FLUX.1-dev", "ae.safetensors", local_dir="ComfyUI/models/vae")
96
 
97
  esrgan_x2_path = "ComfyUI/models/upscale_models/RealESRGAN_x2.pth"
98
  if not os.path.exists(esrgan_x2_path):
 
279
 
280
  return [resized_input, image]
281
 
282
+ with gr.Blocks(css=css, title="🎨 AI Image Upscaler - FLUX ComfyUI") as demo:
283
  gr.HTML("""
284
  <div class="main-header">
285
+ <h1>🎨 AI Image Upscaler (ComfyUI Workflow)</h1>
286
+ <p>Upload an image or provide a URL to upscale it using FLUX FP8 with ComfyUI Ultimate SD Upscale</p>
287
  <p>Using FLUX.1-dev FP8 model</p>
288
  </div>
289
  """)