Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -139,3 +139,27 @@ with gr.Blocks(css=css) as demo:
|
|
139 |
minimum=0.0,
|
140 |
maximum=10.0,
|
141 |
step=0.1,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
minimum=0.0,
|
140 |
maximum=10.0,
|
141 |
step=0.1,
|
142 |
+
value=0.0, #Replace with defaults that work for your model
|
143 |
+
)
|
144 |
+
|
145 |
+
num_inference_steps = gr.Slider(
|
146 |
+
label="Number of inference steps",
|
147 |
+
minimum=1,
|
148 |
+
maximum=50,
|
149 |
+
step=1,
|
150 |
+
value=2, #Replace with defaults that work for your model
|
151 |
+
)
|
152 |
+
|
153 |
+
gr.Examples(
|
154 |
+
examples=examples,
|
155 |
+
inputs=[prompt]
|
156 |
+
)
|
157 |
+
|
158 |
+
gr.on(
|
159 |
+
triggers=[run_button.click, prompt.submit],
|
160 |
+
fn=infer,
|
161 |
+
inputs=[prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
162 |
+
outputs=[result, seed]
|
163 |
+
)
|
164 |
+
|
165 |
+
demo.queue().launch()
|