vilarin commited on
Commit
038406c
·
verified ·
1 Parent(s): f2cf562

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -90,8 +90,9 @@ class ModelWrapper:
90
  else:
91
  raise NotImplementedError()
92
 
93
- noise = noise.to(device="cuda", dtype=torch.float32)
94
  print(f'noise: {noise.dtype}')
 
95
  DTYPE = prompt_embed.dtype
96
  print(f'prompt_embed: {DTYPE}')
97
 
@@ -100,7 +101,6 @@ class ModelWrapper:
100
  #current_timesteps = current_timesteps.to(torch.float16)
101
  print(f'current_timestpes: {current_timesteps.dtype}')
102
  eval_images = self.model(noise, current_timesteps, prompt_embed, added_cond_kwargs=unet_added_conditions).sample
103
- print(type(eval_images))
104
 
105
  eval_images = get_x0_from_noise(noise, eval_images, alphas_cumprod, current_timesteps).to(self.DTYPE)
106
 
 
90
  else:
91
  raise NotImplementedError()
92
 
93
+ noise = noise.to(device="cuda", dtype=torch.float16)
94
  print(f'noise: {noise.dtype}')
95
+ prompt_embed = prompt_embed.to(device="cuda", dtype=torch.float16)
96
  DTYPE = prompt_embed.dtype
97
  print(f'prompt_embed: {DTYPE}')
98
 
 
101
  #current_timesteps = current_timesteps.to(torch.float16)
102
  print(f'current_timestpes: {current_timesteps.dtype}')
103
  eval_images = self.model(noise, current_timesteps, prompt_embed, added_cond_kwargs=unet_added_conditions).sample
 
104
 
105
  eval_images = get_x0_from_noise(noise, eval_images, alphas_cumprod, current_timesteps).to(self.DTYPE)
106