Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -18,11 +18,11 @@ input_image = gr.inputs.Image(type="filepath")
|
|
18 |
output_image = gr.outputs.Image(type="filepath")
|
19 |
|
20 |
# Define the function that will be called when the interface is used
|
21 |
-
def upscale_image(model,
|
22 |
# Convert the image to a PyTorch tensor
|
23 |
generator = torch.manual_seed(999999)
|
24 |
-
|
25 |
-
|
26 |
|
27 |
# Upscale the image using the selected model
|
28 |
if model == "SD 2.0 2x Latent Upscaler":
|
|
|
18 |
output_image = gr.outputs.Image(type="filepath")
|
19 |
|
20 |
# Define the function that will be called when the interface is used
|
21 |
+
def upscale_image(model, input_image):
|
22 |
# Convert the image to a PyTorch tensor
|
23 |
generator = torch.manual_seed(999999)
|
24 |
+
image = Image.open(input_image).convert("RGB")
|
25 |
+
|
26 |
|
27 |
# Upscale the image using the selected model
|
28 |
if model == "SD 2.0 2x Latent Upscaler":
|