Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -146,6 +146,7 @@ def generate(
|
|
146 |
height: int = 1024,
|
147 |
inference_steps: int = 4,
|
148 |
randomize_seed: bool = False,
|
|
|
149 |
use_resolution_binning: bool = True,
|
150 |
progress=gr.Progress(track_tqdm=True),
|
151 |
):
|
@@ -164,7 +165,7 @@ def generate(
|
|
164 |
guidance_scale=0,
|
165 |
num_inference_steps=inference_steps,
|
166 |
generator=generator,
|
167 |
-
num_images_per_prompt=
|
168 |
use_resolution_binning=use_resolution_binning,
|
169 |
output_type="pil",
|
170 |
).images
|
@@ -206,6 +207,7 @@ with gr.Blocks() as demo:
|
|
206 |
)
|
207 |
run_button = gr.Button("Run", scale=0)
|
208 |
result = gr.Gallery(label="Result", columns=NUM_IMAGES_PER_PROMPT, show_label=False)
|
|
|
209 |
with gr.Accordion("Advanced options", open=False):
|
210 |
with gr.Group():
|
211 |
with gr.Row():
|
@@ -232,12 +234,6 @@ with gr.Blocks() as demo:
|
|
232 |
value=DEFAULT_STYLE_NAME,
|
233 |
label="Image Style",
|
234 |
)
|
235 |
-
negative_prompt = gr.Text(
|
236 |
-
label="Negative prompt",
|
237 |
-
max_lines=1,
|
238 |
-
placeholder="Enter a negative prompt",
|
239 |
-
visible=True,
|
240 |
-
)
|
241 |
seed = gr.Slider(
|
242 |
label="Seed",
|
243 |
minimum=0,
|
|
|
146 |
height: int = 1024,
|
147 |
inference_steps: int = 4,
|
148 |
randomize_seed: bool = False,
|
149 |
+
num_images_per_prompt=NUM_IMAGES_PER_PROMPT,
|
150 |
use_resolution_binning: bool = True,
|
151 |
progress=gr.Progress(track_tqdm=True),
|
152 |
):
|
|
|
165 |
guidance_scale=0,
|
166 |
num_inference_steps=inference_steps,
|
167 |
generator=generator,
|
168 |
+
num_images_per_prompt=num_imgs,
|
169 |
use_resolution_binning=use_resolution_binning,
|
170 |
output_type="pil",
|
171 |
).images
|
|
|
207 |
)
|
208 |
run_button = gr.Button("Run", scale=0)
|
209 |
result = gr.Gallery(label="Result", columns=NUM_IMAGES_PER_PROMPT, show_label=False)
|
210 |
+
|
211 |
with gr.Accordion("Advanced options", open=False):
|
212 |
with gr.Group():
|
213 |
with gr.Row():
|
|
|
234 |
value=DEFAULT_STYLE_NAME,
|
235 |
label="Image Style",
|
236 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
seed = gr.Slider(
|
238 |
label="Seed",
|
239 |
minimum=0,
|