Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
| 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="",
|