ford442 commited on
Commit
c5587f1
·
verified ·
1 Parent(s): 655ef34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -157,7 +157,7 @@ def infer(
157
  print(enhanced_prompt)
158
  if latent_file: # Check if a latent file is provided
159
  sd_image_a = torch.load(latent_file.name).to('cuda') # Load the latent
160
- sd_image_b = vae.encode(sd_image_a.to(torch.bfloat16)).latent_dist.sample().mul_(0.18215)
161
  print("-- using latent file --")
162
  print('-- generating image --')
163
  with torch.no_grad():
 
157
  print(enhanced_prompt)
158
  if latent_file: # Check if a latent file is provided
159
  sd_image_a = torch.load(latent_file.name).to('cuda') # Load the latent
160
+ sd_image_b = pipe.vae.encode(sd_image_a.to(torch.bfloat16)).latent_dist.sample().mul_(0.18215)
161
  print("-- using latent file --")
162
  print('-- generating image --')
163
  with torch.no_grad():