amildravid4292 commited on
Commit
e0e9bed
·
verified ·
1 Parent(s): ec1efbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -219,8 +219,11 @@ class main():
219
  print(self.text_encoder.device)
220
  print(self.vae.device)
221
  print(self.network.proj.device)
 
 
222
  noise_pred = self.unet(latent_model_input, t, encoder_hidden_states=text_embeddings, timestep_cond= None).sample
223
- #guidance
 
224
  noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)
225
  noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
226
  latents = noise_scheduler.step(noise_pred, t, latents).prev_sample
 
219
  print(self.text_encoder.device)
220
  print(self.vae.device)
221
  print(self.network.proj.device)
222
+ print(self.network.v.device)
223
+ print(text_embeddings.device)
224
  noise_pred = self.unet(latent_model_input, t, encoder_hidden_states=text_embeddings, timestep_cond= None).sample
225
+ print("after inference")
226
+ #guidance
227
  noise_pred_uncond, noise_pred_text = noise_pred.chunk(2)
228
  noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
229
  latents = noise_scheduler.step(noise_pred, t, latents).prev_sample