Spaces:
Runtime error
Runtime error
Commit
·
f5a1495
1
Parent(s):
2f1e32c
Update Check Device
Browse files
app.py
CHANGED
@@ -116,20 +116,21 @@ with block:
|
|
116 |
with gr.Column():
|
117 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(
|
118 |
grid=[2], height="auto")
|
119 |
-
|
120 |
-
|
121 |
-
[
|
122 |
-
|
123 |
-
|
124 |
-
|
|
|
125 |
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
run_button.click(fn=predict, inputs=[input_image, prompt, negative_prompt,
|
134 |
steps, num_samples, scale, seed, strength], outputs=[gallery])
|
135 |
|
|
|
116 |
with gr.Column():
|
117 |
gallery = gr.Gallery(label="Generated images", show_label=False).style(
|
118 |
grid=[2], height="auto")
|
119 |
+
if device == "cuda":
|
120 |
+
gr.Examples(
|
121 |
+
examples=[
|
122 |
+
["./examples/original_iso.png", "hogwarts castle",
|
123 |
+
"", 50, 4, 10.0, 123123123, 0.8],
|
124 |
+
["./examples/original_sword.png", "flaming sword",
|
125 |
+
"", 50, 4, 9.0, 1734133747, 0.8],
|
126 |
|
127 |
+
],
|
128 |
+
inputs=[input_image, prompt, negative_prompt, steps,
|
129 |
+
num_samples, scale, seed, strength],
|
130 |
+
outputs=[gallery],
|
131 |
+
fn=predict,
|
132 |
+
cache_examples=True,
|
133 |
+
)
|
134 |
run_button.click(fn=predict, inputs=[input_image, prompt, negative_prompt,
|
135 |
steps, num_samples, scale, seed, strength], outputs=[gallery])
|
136 |
|