openfree commited on
Commit
e948d4d
1 Parent(s): d638803

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -587,7 +587,8 @@ def infer_upscale(
587
  if control_image.mode != 'RGB':
588
  control_image = control_image.convert('RGB')
589
 
590
- control_image = torch.from_numpy(np.array(control_image)).permute(2, 0, 1).float().to(device) / 255.0
 
591
 
592
  image = pipe_upscale(
593
  prompt="",
 
587
  if control_image.mode != 'RGB':
588
  control_image = control_image.convert('RGB')
589
 
590
+ # Convert to tensor and add batch dimension
591
+ control_image = torch.from_numpy(np.array(control_image)).permute(2, 0, 1).float().unsqueeze(0).to(device) / 255.0
592
 
593
  image = pipe_upscale(
594
  prompt="",