Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -137,7 +137,7 @@ def generate_image(
|
|
| 137 |
num_inference_steps=steps,
|
| 138 |
generator = generator,
|
| 139 |
num_images_per_prompt = nums,
|
| 140 |
-
)
|
| 141 |
return image, seed
|
| 142 |
|
| 143 |
|
|
@@ -160,7 +160,7 @@ examples = [
|
|
| 160 |
|
| 161 |
with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
|
| 162 |
gr.HTML("<h1><center>SD3M🦄</center></h1>")
|
| 163 |
-
gr.HTML("<p><center><a href='https://huggingface.co/stabilityai/stable-diffusion-3-medium'>sd3m</a> text/image-to-image generation<br>Update
|
| 164 |
with gr.Group():
|
| 165 |
with gr.Row():
|
| 166 |
prompt = gr.MultimodalTextbox(label='Enter Your Prompt (Multi-Languages)', interactive=True, placeholder="Enter prompt, add one image.", file_types=['image'], scale=1)
|
|
@@ -212,6 +212,7 @@ with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
|
|
| 212 |
maximum=10000000000000,
|
| 213 |
step=1,
|
| 214 |
value=-1,
|
|
|
|
| 215 |
)
|
| 216 |
nums = gr.Slider(
|
| 217 |
label="Image Numbers",
|
|
@@ -219,6 +220,7 @@ with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
|
|
| 219 |
maximum=4,
|
| 220 |
step=1,
|
| 221 |
value=1,
|
|
|
|
| 222 |
)
|
| 223 |
gr.Examples(
|
| 224 |
examples=examples,
|
|
|
|
| 137 |
num_inference_steps=steps,
|
| 138 |
generator = generator,
|
| 139 |
num_images_per_prompt = nums,
|
| 140 |
+
).images
|
| 141 |
return image, seed
|
| 142 |
|
| 143 |
|
|
|
|
| 160 |
|
| 161 |
with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
|
| 162 |
gr.HTML("<h1><center>SD3M🦄</center></h1>")
|
| 163 |
+
gr.HTML("<p><center><a href='https://huggingface.co/stabilityai/stable-diffusion-3-medium'>sd3m</a> text/image-to-image generation<br><b>Update</b>: fix T5 issue to support 512 token</center></p>")
|
| 164 |
with gr.Group():
|
| 165 |
with gr.Row():
|
| 166 |
prompt = gr.MultimodalTextbox(label='Enter Your Prompt (Multi-Languages)', interactive=True, placeholder="Enter prompt, add one image.", file_types=['image'], scale=1)
|
|
|
|
| 212 |
maximum=10000000000000,
|
| 213 |
step=1,
|
| 214 |
value=-1,
|
| 215 |
+
scale=3,
|
| 216 |
)
|
| 217 |
nums = gr.Slider(
|
| 218 |
label="Image Numbers",
|
|
|
|
| 220 |
maximum=4,
|
| 221 |
step=1,
|
| 222 |
value=1,
|
| 223 |
+
scale=1,
|
| 224 |
)
|
| 225 |
gr.Examples(
|
| 226 |
examples=examples,
|