amazonaws-la commited on
Commit
d4c416d
·
verified ·
1 Parent(s): b2aa6a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -60,11 +60,11 @@ def generate(
60
  if torch.cuda.is_available():
61
 
62
  if not use_vae:
63
- pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
64
 
65
  if use_vae:
66
- vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
67
- pipe = DiffusionPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16)
68
 
69
  if use_lora:
70
  pipe.load_lora_weights(lora)
 
60
  if torch.cuda.is_available():
61
 
62
  if not use_vae:
63
+ pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16, variant="fp16")
64
 
65
  if use_vae:
66
+ vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16, variant="fp16")
67
+ pipe = DiffusionPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16, variant="fp16")
68
 
69
  if use_lora:
70
  pipe.load_lora_weights(lora)