Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -211,7 +211,32 @@ with gr.Blocks(css=css) as demo:
|
|
| 211 |
negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3, value="")
|
| 212 |
with gr.Column():
|
| 213 |
text_button = gr.Button("Generate", variant='primary', elem_id="generate")
|
| 214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 215 |
text_button.click(txt2img, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height,
|
| 216 |
seed], outputs=image_output, concurrency_limit=64)
|
| 217 |
|
|
@@ -250,33 +275,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 250 |
|
| 251 |
with gr.Column(scale=2):
|
| 252 |
i2i_image_output = gr.Image(value="https://huggingface.co/spaces/salomonsky/fast/raw/main/image.jpg")
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
with gr.Row():
|
| 256 |
-
with gr.Column(scale=3):
|
| 257 |
-
with gr.Tab("Generation"):
|
| 258 |
-
with gr.Row():
|
| 259 |
-
with gr.Column(scale=1):
|
| 260 |
-
sampler = gr.Dropdown(value="DPM++ 2M Karras", show_label=True, label="Sampling Method", choices=prodia_client.list_samplers())
|
| 261 |
-
|
| 262 |
-
with gr.Column(scale=1):
|
| 263 |
-
steps = gr.Slider(label="Sampling Steps", minimum=1, maximum=30, value=25, step=1)
|
| 264 |
|
| 265 |
-
with gr.Row():
|
| 266 |
-
with gr.Column(scale=1):
|
| 267 |
-
width = gr.Slider(label="Width", maximum=1024, value=512, step=8)
|
| 268 |
-
height = gr.Slider(label="Height", maximum=1024, value=512, step=8)
|
| 269 |
-
|
| 270 |
-
with gr.Column(scale=1):
|
| 271 |
-
batch_size = gr.Slider(label="Batch Size", maximum=1, value=1)
|
| 272 |
-
batch_count = gr.Slider(label="Batch Count", maximum=1, value=1)
|
| 273 |
-
|
| 274 |
-
cfg_scale = gr.Slider(label="CFG Scale", minimum=1, maximum=20, value=7, step=1)
|
| 275 |
-
seed = gr.Number(label="Seed", value=-1)
|
| 276 |
-
|
| 277 |
-
with gr.Column(scale=2):
|
| 278 |
-
image_output = gr.Image(value="https://huggingface.co/spaces/salomonsky/fast/raw/main/image.jpg")
|
| 279 |
-
|
| 280 |
i2i_text_button.click(img2img, inputs=[i2i_image_input, i2i_denoising, i2i_prompt, i2i_negative_prompt,
|
| 281 |
model, i2i_steps, i2i_sampler, i2i_cfg_scale, i2i_width, i2i_height,
|
| 282 |
i2i_seed], outputs=i2i_image_output, concurrency_limit=64)
|
|
|
|
| 211 |
negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=False, lines=3, value="")
|
| 212 |
with gr.Column():
|
| 213 |
text_button = gr.Button("Generate", variant='primary', elem_id="generate")
|
| 214 |
+
|
| 215 |
+
with gr.Row():
|
| 216 |
+
with gr.Column(scale=3):
|
| 217 |
+
with gr.Tab("Generation"):
|
| 218 |
+
with gr.Row():
|
| 219 |
+
with gr.Column(scale=1):
|
| 220 |
+
sampler = gr.Dropdown(value="DPM++ 2M Karras", show_label=True, label="Sampling Method", choices=prodia_client.list_samplers())
|
| 221 |
+
|
| 222 |
+
with gr.Column(scale=1):
|
| 223 |
+
steps = gr.Slider(label="Sampling Steps", minimum=1, maximum=30, value=25, step=1)
|
| 224 |
+
|
| 225 |
+
with gr.Row():
|
| 226 |
+
with gr.Column(scale=1):
|
| 227 |
+
width = gr.Slider(label="Width", maximum=1024, value=512, step=8)
|
| 228 |
+
height = gr.Slider(label="Height", maximum=1024, value=512, step=8)
|
| 229 |
+
|
| 230 |
+
with gr.Column(scale=1):
|
| 231 |
+
batch_size = gr.Slider(label="Batch Size", maximum=1, value=1)
|
| 232 |
+
batch_count = gr.Slider(label="Batch Count", maximum=1, value=1)
|
| 233 |
+
|
| 234 |
+
cfg_scale = gr.Slider(label="CFG Scale", minimum=1, maximum=20, value=7, step=1)
|
| 235 |
+
seed = gr.Number(label="Seed", value=-1)
|
| 236 |
+
|
| 237 |
+
with gr.Column(scale=2):
|
| 238 |
+
image_output = gr.Image(value="https://huggingface.co/spaces/salomonsky/fast/raw/main/image.jpg")
|
| 239 |
+
|
| 240 |
text_button.click(txt2img, inputs=[prompt, negative_prompt, model, steps, sampler, cfg_scale, width, height,
|
| 241 |
seed], outputs=image_output, concurrency_limit=64)
|
| 242 |
|
|
|
|
| 275 |
|
| 276 |
with gr.Column(scale=2):
|
| 277 |
i2i_image_output = gr.Image(value="https://huggingface.co/spaces/salomonsky/fast/raw/main/image.jpg")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 278 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 279 |
i2i_text_button.click(img2img, inputs=[i2i_image_input, i2i_denoising, i2i_prompt, i2i_negative_prompt,
|
| 280 |
model, i2i_steps, i2i_sampler, i2i_cfg_scale, i2i_width, i2i_height,
|
| 281 |
i2i_seed], outputs=i2i_image_output, concurrency_limit=64)
|