[FIX] Half Precision problem
Browse files
app.py
CHANGED
@@ -10,7 +10,9 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
10 |
|
11 |
model_id = "stabilityai/stable-diffusion-2-1-base"
|
12 |
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
|
13 |
-
|
|
|
|
|
14 |
pipe = pipe.to(device)
|
15 |
model, preprocess = clip.load("ViT-B/32", device=device)
|
16 |
|
|
|
10 |
|
11 |
model_id = "stabilityai/stable-diffusion-2-1-base"
|
12 |
scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
|
13 |
+
# [FIX] half precision problem
|
14 |
+
# pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, revision="fp16", torch_dtype=torch.float16)
|
15 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler)
|
16 |
pipe = pipe.to(device)
|
17 |
model, preprocess = clip.load("ViT-B/32", device=device)
|
18 |
|