Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ pipe = StableDiffusionPipeline.from_pretrained(
|
|
| 11 |
|
| 12 |
pipe.to("cpu")
|
| 13 |
|
| 14 |
-
#
|
| 15 |
pipe.enable_attention_slicing()
|
| 16 |
|
| 17 |
# Faster scheduler
|
|
@@ -24,7 +24,7 @@ def generate(prompt):
|
|
| 24 |
prompt,
|
| 25 |
width=384,
|
| 26 |
height=384,
|
| 27 |
-
num_inference_steps=
|
| 28 |
guidance_scale=7
|
| 29 |
).images[0]
|
| 30 |
|
|
@@ -39,7 +39,7 @@ app = gr.Interface(
|
|
| 39 |
outputs=gr.Image(
|
| 40 |
label="Generated Image"
|
| 41 |
),
|
| 42 |
-
title="Fast Stable Diffusion 1.5 CPU
|
| 43 |
)
|
| 44 |
|
| 45 |
app.launch()
|
|
|
|
| 11 |
|
| 12 |
pipe.to("cpu")
|
| 13 |
|
| 14 |
+
# Faster memory usage
|
| 15 |
pipe.enable_attention_slicing()
|
| 16 |
|
| 17 |
# Faster scheduler
|
|
|
|
| 24 |
prompt,
|
| 25 |
width=384,
|
| 26 |
height=384,
|
| 27 |
+
num_inference_steps=12,
|
| 28 |
guidance_scale=7
|
| 29 |
).images[0]
|
| 30 |
|
|
|
|
| 39 |
outputs=gr.Image(
|
| 40 |
label="Generated Image"
|
| 41 |
),
|
| 42 |
+
title="Fast Stable Diffusion 1.5 CPU"
|
| 43 |
)
|
| 44 |
|
| 45 |
app.launch()
|