Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,6 @@ pipe_cn = StableDiffusionXLControlNetPipeline.from_pretrained(
|
|
33 |
torch_dtype=precision,
|
34 |
scheduler=eulera_scheduler,
|
35 |
)
|
36 |
-
|
37 |
pipe_cn.to(device)
|
38 |
|
39 |
# Stable Diffusion Model without ControlNet
|
@@ -43,7 +42,6 @@ pipe = StableDiffusionXLPipeline.from_pretrained(
|
|
43 |
torch_dtype=precision,
|
44 |
scheduler=eulera_scheduler,
|
45 |
)
|
46 |
-
|
47 |
pipe.to(device)
|
48 |
|
49 |
|
@@ -131,22 +129,5 @@ with gr.Blocks() as demo:
|
|
131 |
)
|
132 |
|
133 |
|
134 |
-
# ✅ Expose for API without adding UI
|
135 |
-
"""
|
136 |
-
demo.load(
|
137 |
-
fn=generate_image,
|
138 |
-
inputs=[
|
139 |
-
prompt,
|
140 |
-
input_image,
|
141 |
-
low_threshold,
|
142 |
-
high_threshold,
|
143 |
-
strength,
|
144 |
-
guidance,
|
145 |
-
controlnet_conditioning_scale
|
146 |
-
],
|
147 |
-
outputs=[edge_output, result_output],
|
148 |
-
api_name="/generate_image"
|
149 |
-
)
|
150 |
-
"""
|
151 |
# 🚀 Launch the app
|
152 |
demo.launch(share=True)
|
|
|
33 |
torch_dtype=precision,
|
34 |
scheduler=eulera_scheduler,
|
35 |
)
|
|
|
36 |
pipe_cn.to(device)
|
37 |
|
38 |
# Stable Diffusion Model without ControlNet
|
|
|
42 |
torch_dtype=precision,
|
43 |
scheduler=eulera_scheduler,
|
44 |
)
|
|
|
45 |
pipe.to(device)
|
46 |
|
47 |
|
|
|
129 |
)
|
130 |
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
# 🚀 Launch the app
|
133 |
demo.launch(share=True)
|