xywwww commited on
Commit
3ffa732
·
verified ·
1 Parent(s): 1a49aca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -38,7 +38,8 @@ def process(input_image, prompt, a_prompt, n_prompt, num_samples, image_resoluti
38
  # detected_map = apply_canny(img, low_threshold, high_threshold)
39
  # detected_map = HWC3(detected_map)
40
 
41
- control = torch.from_numpy(img.copy()).float().cuda() / 255.0
 
42
  control = torch.stack([control for _ in range(num_samples)], dim=0)
43
  control = einops.rearrange(control, 'b h w c -> b c h w').clone()
44
  control = control.to(memory_format=torch.contiguous_format).float()
 
38
  # detected_map = apply_canny(img, low_threshold, high_threshold)
39
  # detected_map = HWC3(detected_map)
40
 
41
+ #control = torch.from_numpy(img.copy()).float().cuda() / 255.0
42
+ control = torch.from_numpy(img.copy()).float() / 255.0
43
  control = torch.stack([control for _ in range(num_samples)], dim=0)
44
  control = einops.rearrange(control, 'b h w c -> b c h w').clone()
45
  control = control.to(memory_format=torch.contiguous_format).float()