amazonaws-sp commited on
Commit
031301f
·
verified ·
1 Parent(s): 5519795

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -59,12 +59,13 @@ def generate(
59
  url = '',
60
  ):
61
  if torch.cuda.is_available():
62
-
63
- if use_vae:
64
- vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
65
 
66
  if not use_img2img:
67
- pipe = DiffusionPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16)
 
 
 
 
68
 
69
  if use_img2img:
70
  pipe = AutoPipelineForImage2Image.from_pretrained(model, vae=vae, torch_dtype=torch.float16)
 
59
  url = '',
60
  ):
61
  if torch.cuda.is_available():
 
 
 
62
 
63
  if not use_img2img:
64
+ pipe = DiffusionPipeline.from_pretrained(model, torch_dtype=torch.float16)
65
+
66
+ if use_vae:
67
+ vae = AutoencoderKL.from_pretrained(vaecall, torch_dtype=torch.float16)
68
+ pipe = DiffusionPipeline.from_pretrained(model, vae=vae, torch_dtype=torch.float16)
69
 
70
  if use_img2img:
71
  pipe = AutoPipelineForImage2Image.from_pretrained(model, vae=vae, torch_dtype=torch.float16)