Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -197,6 +197,7 @@ model_management.load_models_gpu([
|
|
197 |
|
198 |
print("Setup complete!")
|
199 |
|
|
|
200 |
def generate_image(prompt, structure_image, style_image, depth_strength=15, canny_strength=30, style_strength=0.5, steps=28, progress=gr.Progress(track_tqdm=True)):
|
201 |
"""Main generation function that processes inputs and returns the path to the generated image."""
|
202 |
timestamp = random.randint(10000, 99999)
|
@@ -368,7 +369,7 @@ def generate_image(prompt, structure_image, style_image, depth_strength=15, cann
|
|
368 |
# Fall back to the expected path
|
369 |
return os.path.join("output", output_filename)
|
370 |
|
371 |
-
|
372 |
with gr.Blocks(css="footer {visibility: hidden}") as app:
|
373 |
gr.Markdown("# 🎨 FLUX Zen Style Depth+Canny")
|
374 |
gr.Markdown("Flux[dev] Redux + Flux[dev] Depth and XLabs Canny based on the space FLUX Style Shaping")
|
|
|
197 |
|
198 |
print("Setup complete!")
|
199 |
|
200 |
+
@spaces.GPU
|
201 |
def generate_image(prompt, structure_image, style_image, depth_strength=15, canny_strength=30, style_strength=0.5, steps=28, progress=gr.Progress(track_tqdm=True)):
|
202 |
"""Main generation function that processes inputs and returns the path to the generated image."""
|
203 |
timestamp = random.randint(10000, 99999)
|
|
|
369 |
# Fall back to the expected path
|
370 |
return os.path.join("output", output_filename)
|
371 |
|
372 |
+
|
373 |
with gr.Blocks(css="footer {visibility: hidden}") as app:
|
374 |
gr.Markdown("# 🎨 FLUX Zen Style Depth+Canny")
|
375 |
gr.Markdown("Flux[dev] Redux + Flux[dev] Depth and XLabs Canny based on the space FLUX Style Shaping")
|