Jialu commited on
Commit
5e04811
·
1 Parent(s): d182e8d

[FIX] Half Precision problem

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, revision="fp16", torch_dtype=torch.float16)
 
 
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