Spaces:
Running
on
Zero
Running
on
Zero
alfredplpl
commited on
Commit
·
1b6ee33
1
Parent(s):
5057aba
Update app.py
Browse files
app.py
CHANGED
@@ -13,12 +13,12 @@ feature_extractor = CLIPFeatureExtractor.from_pretrained(model_id)
|
|
13 |
|
14 |
pipe = StableDiffusionPipeline.from_pretrained(
|
15 |
model_id,
|
16 |
-
torch_dtype=torch.float32,
|
17 |
scheduler=scheduler)
|
18 |
|
19 |
pipe_i2i = StableDiffusionImg2ImgPipeline.from_pretrained(
|
20 |
model_id,
|
21 |
-
torch_dtype=torch.float32,
|
22 |
scheduler=scheduler,
|
23 |
requires_safety_checker=False,
|
24 |
safety_checker=None,
|
|
|
13 |
|
14 |
pipe = StableDiffusionPipeline.from_pretrained(
|
15 |
model_id,
|
16 |
+
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
17 |
scheduler=scheduler)
|
18 |
|
19 |
pipe_i2i = StableDiffusionImg2ImgPipeline.from_pretrained(
|
20 |
model_id,
|
21 |
+
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
22 |
scheduler=scheduler,
|
23 |
requires_safety_checker=False,
|
24 |
safety_checker=None,
|