Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,10 @@ def process_image(prompt, image, style, upscale_factor, inpaint):
|
|
26 |
image = Image.fromarray(image)
|
27 |
elif isinstance(image, torch.Tensor):
|
28 |
image = transforms.ToPILImage()(image)
|
29 |
-
elif
|
|
|
|
|
|
|
30 |
return None, f"Error: Unsupported image format. Received {type(image)}."
|
31 |
|
32 |
# Log the input parameters
|
|
|
26 |
image = Image.fromarray(image)
|
27 |
elif isinstance(image, torch.Tensor):
|
28 |
image = transforms.ToPILImage()(image)
|
29 |
+
elif isinstance(image, Image.Image):
|
30 |
+
# Image is already in the correct format
|
31 |
+
pass
|
32 |
+
else:
|
33 |
return None, f"Error: Unsupported image format. Received {type(image)}."
|
34 |
|
35 |
# Log the input parameters
|