Spaces:
Paused
Paused
uuu
Browse files
app.py
CHANGED
|
@@ -66,40 +66,35 @@ def gui_generation(prompt, ref_img, guidance_scale, ipadapter_scale):
|
|
| 66 |
ipadapter_scale=ipadapter_scale).images
|
| 67 |
return image[0]
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
inputs=[prompt_box, ref_img, guidance_slider, ipadapter_slider],
|
| 102 |
-
outputs="image",
|
| 103 |
-
)
|
| 104 |
-
|
| 105 |
-
demo.launch()
|
|
|
|
| 66 |
ipadapter_scale=ipadapter_scale).images
|
| 67 |
return image[0]
|
| 68 |
|
| 69 |
+
prompt_box = gr.Textbox(label="Prompt", placeholder="Enter your image generation prompt")
|
| 70 |
+
ref_img = gr.File(label="Upload Reference Image")
|
| 71 |
+
guidance_slider = gr.Slider(
|
| 72 |
+
label="Guidance Scale",
|
| 73 |
+
minimum=2,
|
| 74 |
+
maximum=16,
|
| 75 |
+
value=7,
|
| 76 |
+
step=0.5,
|
| 77 |
+
info="Controls adherence to the text prompt")
|
| 78 |
+
|
| 79 |
+
ipadapter_slider = gr.Slider(
|
| 80 |
+
label="IP-Adapter Scale",
|
| 81 |
+
minimum=0,
|
| 82 |
+
maximum=1,
|
| 83 |
+
value=0.5,
|
| 84 |
+
step=0.1,
|
| 85 |
+
info="Controls influence of the image prompt"
|
| 86 |
+
)
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
# Set up Gradio interface
|
| 91 |
+
interface = gr.Interface(
|
| 92 |
+
fn=gui_generation,
|
| 93 |
+
inputs=[prompt_box, ref_img, guidance_slider, ipadapter_slider],
|
| 94 |
+
outputs="image",
|
| 95 |
+
title="Image Generation with Stable Diffusion 3 medium and ControlNet",
|
| 96 |
+
description="Generates an image based on a text prompt and a reference image using Stable Diffusion 3 medium with ControlNet."
|
| 97 |
+
|
| 98 |
+
)
|
| 99 |
+
|
| 100 |
+
interface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|