Spaces:
Build error
Build error
Commit
·
18f6a92
1
Parent(s):
1d1a760
Update app.py
Browse files
app.py
CHANGED
@@ -68,12 +68,15 @@ if is_colab:
|
|
68 |
|
69 |
|
70 |
else:
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
|
|
|
|
77 |
|
78 |
device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
|
79 |
|
|
|
68 |
|
69 |
|
70 |
else:
|
71 |
+
pipe = StableDiffusionPipeline.from_pretrained(
|
72 |
+
current_model.path,
|
73 |
+
torch_dtype=torch.float16,
|
74 |
+
scheduler=DPMSolverMultistepScheduler.from_pretrained(current_model.path, subfolder="scheduler")
|
75 |
+
)
|
76 |
+
|
77 |
+
if torch.cuda.is_available():
|
78 |
+
pipe = pipe.to("cuda")
|
79 |
+
pipe.enable_xformers_memory_efficient_attention()
|
80 |
|
81 |
device = "GPU 🔥" if torch.cuda.is_available() else "CPU 🥶"
|
82 |
|