Spaces:
Sleeping
Sleeping
Pedro Cuenca
commited on
Commit
·
2bf201c
1
Parent(s):
4b6a41a
Reduce the number of steps while we run on CPU.
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ from PIL import Image
|
|
13 |
SELECT_LABEL = "Select as seed"
|
14 |
|
15 |
MODEL_ID = "CompVis/ldm-text2im-large-256"
|
16 |
-
STEPS =
|
17 |
ETA = 0.3
|
18 |
GUIDANCE_SCALE = 6
|
19 |
|
@@ -21,7 +21,6 @@ ldm = DiffusionPipeline.from_pretrained(MODEL_ID)
|
|
21 |
|
22 |
import torch
|
23 |
print(f"cuda: {torch.cuda.is_available()}")
|
24 |
-
print(f"device: {torch.cuda.get_device_name()}")
|
25 |
|
26 |
with gr.Blocks(css=".container { max-width: 800px; margin: auto; }") as demo:
|
27 |
state = gr.Variable({
|
|
|
13 |
SELECT_LABEL = "Select as seed"
|
14 |
|
15 |
MODEL_ID = "CompVis/ldm-text2im-large-256"
|
16 |
+
STEPS = 25 # while running on CPU
|
17 |
ETA = 0.3
|
18 |
GUIDANCE_SCALE = 6
|
19 |
|
|
|
21 |
|
22 |
import torch
|
23 |
print(f"cuda: {torch.cuda.is_available()}")
|
|
|
24 |
|
25 |
with gr.Blocks(css=".container { max-width: 800px; margin: auto; }") as demo:
|
26 |
state = gr.Variable({
|