Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,7 +48,9 @@ with gr.Blocks(css= "style.css") as app:
|
|
| 48 |
height_input = gr.Slider(minimum=128, maximum=2048, step=128, label="Height", value=512)
|
| 49 |
cfg_scale_input = gr.Slider(minimum=1, maximum=20, step=1, label="CFG Scale", value=7)
|
| 50 |
seed_input = gr.Number(label="Seed", value=-1)
|
| 51 |
-
|
|
|
|
|
|
|
| 52 |
|
| 53 |
with gr.Column():
|
| 54 |
# Gallery untuk output gambar
|
|
@@ -60,7 +62,7 @@ with gr.Blocks(css= "style.css") as app:
|
|
| 60 |
# Update fungsi sesuai kebutuhan
|
| 61 |
return generate_image(prompt, neg_prompt, width, height, scheduler, num_steps, num_images, cfg_scale, seed, model)
|
| 62 |
|
| 63 |
-
generate_button.click(fn=update_images, inputs=[prompt_input, neg_prompt_input, width_input, height_input, scheduler_input, num_steps_input,
|
| 64 |
|
| 65 |
# Tab untuk Image-to-Image
|
| 66 |
with gr.Tab("Image-to-Image"):
|
|
|
|
| 48 |
height_input = gr.Slider(minimum=128, maximum=2048, step=128, label="Height", value=512)
|
| 49 |
cfg_scale_input = gr.Slider(minimum=1, maximum=20, step=1, label="CFG Scale", value=7)
|
| 50 |
seed_input = gr.Number(label="Seed", value=-1)
|
| 51 |
+
batch_size = gr.Slider(minimum=1, maximum=10, step=1, label="Batch size", value=1)
|
| 52 |
+
batch_count = gr.Slider(minimum=1, maximum=10, step=1, label="Batch size", value=1)
|
| 53 |
+
|
| 54 |
|
| 55 |
with gr.Column():
|
| 56 |
# Gallery untuk output gambar
|
|
|
|
| 62 |
# Update fungsi sesuai kebutuhan
|
| 63 |
return generate_image(prompt, neg_prompt, width, height, scheduler, num_steps, num_images, cfg_scale, seed, model)
|
| 64 |
|
| 65 |
+
generate_button.click(fn=update_images, inputs=[prompt_input, neg_prompt_input, width_input, height_input, scheduler_input, num_steps_input, batch_size, batch_count, cfg_scale_input, seed_input, model_dropdown, vae_dropdown], outputs=[output_gallery, output_text])
|
| 66 |
|
| 67 |
# Tab untuk Image-to-Image
|
| 68 |
with gr.Tab("Image-to-Image"):
|