owiedotch commited on
Commit
ac72687
1 Parent(s): a90253a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -121,13 +121,14 @@ def process(
121
  if torch.cuda.is_available():
122
  model.to("cuda")
123
  control = control.to("cuda")
124
- x_T = x_T.to("cuda")
125
 
126
  sampler = SpacedSampler(model, var_type="fixed_small")
127
  preds = []
128
  for _ in tqdm(range(num_samples)):
129
  shape = (1, 4, height // 8, width // 8)
130
  x_T = torch.randn(shape, device=device, dtype=torch.float32)
 
 
131
  if not tile_diffusion:
132
  samples = sampler.sample_ccsr(
133
  steps=steps, t_max=0.6667, t_min=0.3333, shape=shape, cond_img=control,
 
121
  if torch.cuda.is_available():
122
  model.to("cuda")
123
  control = control.to("cuda")
 
124
 
125
  sampler = SpacedSampler(model, var_type="fixed_small")
126
  preds = []
127
  for _ in tqdm(range(num_samples)):
128
  shape = (1, 4, height // 8, width // 8)
129
  x_T = torch.randn(shape, device=device, dtype=torch.float32)
130
+ if torch.cuda.is_available():
131
+ x_T = x_T.to("cuda")
132
  if not tile_diffusion:
133
  samples = sampler.sample_ccsr(
134
  steps=steps, t_max=0.6667, t_min=0.3333, shape=shape, cond_img=control,