Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 |
-
|
|
|
|
| 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
|