Spaces:
Build error
Build error
Commit
·
5d139de
1
Parent(s):
4838400
Update app.py
Browse files
app.py
CHANGED
@@ -70,14 +70,11 @@ if is_colab:
|
|
70 |
|
71 |
else:
|
72 |
pipe = StableDiffusionPipeline.from_pretrained(
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
if torch.cuda.is_available():
|
79 |
-
pipe = pipe.to("cuda")
|
80 |
-
pipe.enable_xformers_memory_efficient_attention()
|
81 |
|
82 |
device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
|
83 |
|
|
|
70 |
|
71 |
else:
|
72 |
pipe = StableDiffusionPipeline.from_pretrained(
|
73 |
+
model_id,
|
74 |
+
revision="fp16" if torch.cuda.is_available() else "fp32",
|
75 |
+
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
76 |
+
scheduler=scheduler
|
77 |
+
).to("cuda")
|
|
|
|
|
|
|
78 |
|
79 |
device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
|
80 |
|