Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -63,14 +63,16 @@ def infer(input_image, prompt, seed=42, randomize_seed=False, guidance_scale=2.5
|
|
63 |
input_image = input_image.convert("RGB")
|
64 |
original_width, original_height = input_image.width, input_image.height
|
65 |
now_width, now_height = input_image.width, input_image.height
|
66 |
-
scale =
|
67 |
-
if input_image.height // input_image.width >= 5 or input_image.width // input_image.height >= 5:
|
68 |
-
if input_image.height < input_image.width:
|
69 |
-
|
70 |
-
|
71 |
-
else:
|
72 |
-
|
73 |
-
|
|
|
|
|
74 |
image = pipe(
|
75 |
image=input_image,
|
76 |
prompt=prompt,
|
|
|
63 |
input_image = input_image.convert("RGB")
|
64 |
original_width, original_height = input_image.width, input_image.height
|
65 |
now_width, now_height = input_image.width, input_image.height
|
66 |
+
scale = 2
|
67 |
+
if (input_image.height // input_image.width >= 5 or input_image.width // input_image.height >= 5) and (input_image.width < 2560 and input_image.height < 2560):
|
68 |
+
# if input_image.height < input_image.width:
|
69 |
+
# input_image.resize((original_width, original_height * scale ))
|
70 |
+
# now_width, now_height = input_image.width, input_image.height * scale
|
71 |
+
# else:
|
72 |
+
# input_image.resize((original_width * scale, original_height))
|
73 |
+
# now_width, now_height = input_image.width * scale, input_image.height
|
74 |
+
input_image.resize((original_width, original_height * scale ))
|
75 |
+
now_width, now_height = input_image.width, input_image.height * scale
|
76 |
image = pipe(
|
77 |
image=input_image,
|
78 |
prompt=prompt,
|