Spaces:
Runtime error
Runtime error
ChenyangSi
commited on
Commit
·
1e8d7dc
1
Parent(s):
7d24c56
Update app.py
Browse files
app.py
CHANGED
@@ -131,12 +131,12 @@ with block:
|
|
131 |
with gr.Row():
|
132 |
sd_options = gr.Dropdown(["SD1.4", "SD1.5", "SD2.1"], label="SD options")
|
133 |
|
134 |
-
if sd_options == 'SD1.5':
|
135 |
-
|
136 |
-
elif sd_options == 'SD2.1':
|
137 |
-
|
138 |
-
else:
|
139 |
-
|
140 |
|
141 |
# pip = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
142 |
# pip = pip.to("cuda")
|
@@ -200,11 +200,11 @@ with block:
|
|
200 |
image_2_label = gr.Markdown("FreeU")
|
201 |
|
202 |
|
203 |
-
ex = gr.Examples(examples=examples, fn=infer, inputs=[text,
|
204 |
ex.dataset.headers = [""]
|
205 |
|
206 |
-
text.submit(infer, inputs=[text,
|
207 |
-
btn.click(infer, inputs=[text,
|
208 |
|
209 |
block.launch()
|
210 |
# block.queue(default_enabled=False).launch(share=False)
|
|
|
131 |
with gr.Row():
|
132 |
sd_options = gr.Dropdown(["SD1.4", "SD1.5", "SD2.1"], label="SD options")
|
133 |
|
134 |
+
# if sd_options == 'SD1.5':
|
135 |
+
# sd = 1.5
|
136 |
+
# elif sd_options == 'SD2.1':
|
137 |
+
# sd = 2.1
|
138 |
+
# else:
|
139 |
+
# sd = 1.4
|
140 |
|
141 |
# pip = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
142 |
# pip = pip.to("cuda")
|
|
|
200 |
image_2_label = gr.Markdown("FreeU")
|
201 |
|
202 |
|
203 |
+
ex = gr.Examples(examples=examples, fn=infer, inputs=[text, sd_options, seed, b1, b2, s1, s2], outputs=[image_1, image_2], cache_examples=False)
|
204 |
ex.dataset.headers = [""]
|
205 |
|
206 |
+
text.submit(infer, inputs=[text, sd_options, seed, b1, b2, s1, s2], outputs=[image_1, image_2])
|
207 |
+
btn.click(infer, inputs=[text, sd_options, seed, b1, b2, s1, s2], outputs=[image_1, image_2])
|
208 |
|
209 |
block.launch()
|
210 |
# block.queue(default_enabled=False).launch(share=False)
|