PommesPeter commited on
Commit
d3dabcd
1 Parent(s): 005776b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -183,7 +183,7 @@ def infer_ode(args, infer_args, text_encoder, tokenizer, vae, model):
183
  # vae = vae.cuda()
184
  # model = model.to("cuda", dtype=dtype)
185
 
186
- with torch.autocast(device, dtype):
187
  (
188
  cap,
189
  resolution,
@@ -244,7 +244,7 @@ def infer_ode(args, infer_args, text_encoder, tokenizer, vae, model):
244
  latent_w, latent_h = w // 8, h // 8
245
  if int(seed) != 0:
246
  torch.random.manual_seed(int(seed))
247
- z = torch.randn([1, 4, latent_h, latent_w], device=device).to(dtype)
248
  z = z.repeat(2, 1, 1, 1)
249
 
250
  with torch.no_grad():
 
183
  # vae = vae.cuda()
184
  # model = model.to("cuda", dtype=dtype)
185
 
186
+ with torch.autocast("cuda", dtype):
187
  (
188
  cap,
189
  resolution,
 
244
  latent_w, latent_h = w // 8, h // 8
245
  if int(seed) != 0:
246
  torch.random.manual_seed(int(seed))
247
+ z = torch.randn([1, 4, latent_h, latent_w], device="cuda").to(dtype)
248
  z = z.repeat(2, 1, 1, 1)
249
 
250
  with torch.no_grad():