Update app.py
Browse files
app.py
CHANGED
|
@@ -60,6 +60,8 @@ def generate_image(prompt: str, negative_prompt: str = "", inference_steps: int
|
|
| 60 |
guidance_scale=float(guidance_scale),
|
| 61 |
jit=True,
|
| 62 |
).images
|
|
|
|
|
|
|
| 63 |
return image[0]
|
| 64 |
|
| 65 |
examples = [
|
|
@@ -292,7 +294,7 @@ with block as demo:
|
|
| 292 |
fn=generate_image,
|
| 293 |
inputs=[prompt_input, negative,inf_steps_input, seed_input, guidance_scale],
|
| 294 |
outputs=[gallery],
|
| 295 |
-
cache_examples=
|
| 296 |
ex.dataset.headers = [""]
|
| 297 |
|
| 298 |
share_button = gr.Button("Share to community",elem_classes="share_button")
|
|
|
|
| 60 |
guidance_scale=float(guidance_scale),
|
| 61 |
jit=True,
|
| 62 |
).images
|
| 63 |
+
images = images.reshape((num_samples,) + images.shape[-3:])
|
| 64 |
+
images = pipeline.numpy_to_pil(images)
|
| 65 |
return image[0]
|
| 66 |
|
| 67 |
examples = [
|
|
|
|
| 294 |
fn=generate_image,
|
| 295 |
inputs=[prompt_input, negative,inf_steps_input, seed_input, guidance_scale],
|
| 296 |
outputs=[gallery],
|
| 297 |
+
cache_examples=False)
|
| 298 |
ex.dataset.headers = [""]
|
| 299 |
|
| 300 |
share_button = gr.Button("Share to community",elem_classes="share_button")
|