Spaces:
Running
on
Zero
Running
on
Zero
clementchadebec
commited on
Commit
•
6e8bc8b
1
Parent(s):
bfd8827
Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,7 @@ def process_input(input_image, upscale_factor, **kwargs):
|
|
63 |
f"Requested output image is too large ({w * upscale_factor}x{h * upscale_factor}). Resizing to ({int(aspect_ratio * MAX_PIXEL_BUDGET ** 0.5 // upscale_factor), int(MAX_PIXEL_BUDGET ** 0.5 // aspect_ratio // upscale_factor)}) pixels."
|
64 |
)
|
65 |
gr.Info(
|
66 |
-
f"Requested output image is too large ({w * upscale_factor}x{h * upscale_factor}). Resizing to ({int(aspect_ratio * MAX_PIXEL_BUDGET ** 0.5 // upscale_factor), int(MAX_PIXEL_BUDGET ** 0.5 // aspect_ratio // upscale_factor)})
|
67 |
)
|
68 |
input_image = input_image.resize(
|
69 |
(
|
@@ -104,6 +104,7 @@ def infer(
|
|
104 |
|
105 |
generator = torch.Generator().manual_seed(seed)
|
106 |
|
|
|
107 |
image = pipe(
|
108 |
prompt="",
|
109 |
control_image=control_image,
|
@@ -117,7 +118,7 @@ def infer(
|
|
117 |
|
118 |
if was_resized:
|
119 |
gr.Info(
|
120 |
-
f"
|
121 |
)
|
122 |
|
123 |
# resize to target desired size
|
|
|
63 |
f"Requested output image is too large ({w * upscale_factor}x{h * upscale_factor}). Resizing to ({int(aspect_ratio * MAX_PIXEL_BUDGET ** 0.5 // upscale_factor), int(MAX_PIXEL_BUDGET ** 0.5 // aspect_ratio // upscale_factor)}) pixels."
|
64 |
)
|
65 |
gr.Info(
|
66 |
+
f"Requested output image is too large ({w * upscale_factor}x{h * upscale_factor}). Resizing input to ({int(aspect_ratio * MAX_PIXEL_BUDGET ** 0.5 // upscale_factor), int(MAX_PIXEL_BUDGET ** 0.5 // aspect_ratio // upscale_factor)}) pixels budget."
|
67 |
)
|
68 |
input_image = input_image.resize(
|
69 |
(
|
|
|
104 |
|
105 |
generator = torch.Generator().manual_seed(seed)
|
106 |
|
107 |
+
gr.Info("Upscaling image...")
|
108 |
image = pipe(
|
109 |
prompt="",
|
110 |
control_image=control_image,
|
|
|
118 |
|
119 |
if was_resized:
|
120 |
gr.Info(
|
121 |
+
f"Resizing output image to targeted {w_original * upscale_factor}x{h_original * upscale_factor} size."
|
122 |
)
|
123 |
|
124 |
# resize to target desired size
|