Zhenyu Li commited on
Commit
2c2bb01
·
1 Parent(s): abbda4e
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -147,7 +147,7 @@ def process(input_image, prompt, a_prompt, n_prompt, num_samples, image_resoluti
147
  detected_map = detected_map[:, :, None]
148
  detected_map = np.concatenate([detected_map, detected_map, detected_map], axis=2)
149
 
150
- control = torch.from_numpy(detected_map.copy()).float().cuda() / 255.0
151
  control = torch.stack([control for _ in range(num_samples)], dim=0)
152
  control = einops.rearrange(control, 'b h w c -> b c h w').clone()
153
 
 
147
  detected_map = detected_map[:, :, None]
148
  detected_map = np.concatenate([detected_map, detected_map, detected_map], axis=2)
149
 
150
+ control = torch.from_numpy(detected_map.copy()).float().to(DEVICE) / 255.0
151
  control = torch.stack([control for _ in range(num_samples)], dim=0)
152
  control = einops.rearrange(control, 'b h w c -> b c h w').clone()
153