ford442 commited on
Commit
4e43f2f
·
verified ·
1 Parent(s): 9d06315

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -112,7 +112,9 @@ def load_and_prepare_model():
112
  #pipe.enable_vae_tiling()
113
  pipe.to(device=device, dtype=torch.bfloat16)
114
  pipe.unet.set_attn_processor(AttnProcessor2_0())
115
- pipe.vae = vaeXL #.to('cpu') #.to(torch.bfloat16)
 
 
116
  pipe.vae.set_default_attn_processor()
117
  return pipe
118
 
 
112
  #pipe.enable_vae_tiling()
113
  pipe.to(device=device, dtype=torch.bfloat16)
114
  pipe.unet.set_attn_processor(AttnProcessor2_0())
115
+ #pipe.vae = vaeXL #.to('cpu') #.to(torch.bfloat16)
116
+ pipe.vae = vaeXL.to(device=device, dtype=torch.bfloat16) # for non-offload
117
+
118
  pipe.vae.set_default_attn_processor()
119
  return pipe
120