Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -123,7 +123,7 @@ def generate(
|
|
| 123 |
negative_prompt = None # type: ignore
|
| 124 |
prompt, negative_prompt = apply_style(style, prompt, negative_prompt)
|
| 125 |
|
| 126 |
-
|
| 127 |
prompt=prompt,
|
| 128 |
negative_prompt=negative_prompt,
|
| 129 |
width=width,
|
|
@@ -131,14 +131,12 @@ def generate(
|
|
| 131 |
guidance_scale=0,
|
| 132 |
num_inference_steps=inference_steps,
|
| 133 |
generator=generator,
|
| 134 |
-
num_images_per_prompt=NUM_IMAGES_PER_PROMPT,
|
| 135 |
use_resolution_binning=use_resolution_binning,
|
| 136 |
-
|
| 137 |
-
).images
|
| 138 |
|
| 139 |
image_paths = [save_image(img) for img in images]
|
| 140 |
print(image_paths)
|
| 141 |
-
return
|
| 142 |
|
| 143 |
|
| 144 |
examples = [
|
|
@@ -172,7 +170,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 172 |
container=False,
|
| 173 |
)
|
| 174 |
run_button = gr.Button("Run", scale=0)
|
| 175 |
-
result = gr.
|
| 176 |
|
| 177 |
with gr.Accordion("Advanced options", open=False):
|
| 178 |
with gr.Group():
|
|
|
|
| 123 |
negative_prompt = None # type: ignore
|
| 124 |
prompt, negative_prompt = apply_style(style, prompt, negative_prompt)
|
| 125 |
|
| 126 |
+
image = pipe(
|
| 127 |
prompt=prompt,
|
| 128 |
negative_prompt=negative_prompt,
|
| 129 |
width=width,
|
|
|
|
| 131 |
guidance_scale=0,
|
| 132 |
num_inference_steps=inference_steps,
|
| 133 |
generator=generator,
|
|
|
|
| 134 |
use_resolution_binning=use_resolution_binning,
|
| 135 |
+
).images[0]
|
|
|
|
| 136 |
|
| 137 |
image_paths = [save_image(img) for img in images]
|
| 138 |
print(image_paths)
|
| 139 |
+
return images, seed
|
| 140 |
|
| 141 |
|
| 142 |
examples = [
|
|
|
|
| 170 |
container=False,
|
| 171 |
)
|
| 172 |
run_button = gr.Button("Run", scale=0)
|
| 173 |
+
result = gr.Image(label="Result")
|
| 174 |
|
| 175 |
with gr.Accordion("Advanced options", open=False):
|
| 176 |
with gr.Group():
|