Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -110,12 +110,12 @@ def predict(
|
|
110 |
input_image = input_image.convert("RGB").resize((int(size1 / size2 * 1024), 1024))
|
111 |
|
112 |
img = np.array(input_image.convert("RGB"))
|
113 |
-
|
114 |
-
W = int(np.shape(img)[1] - np.shape(img)[1] % 16)
|
115 |
H = int(np.shape(img)[0] - np.shape(img)[0] % 16)
|
116 |
-
|
117 |
-
|
118 |
-
|
|
|
119 |
|
120 |
if seed == -1:
|
121 |
seed = random.randint(1, 2147483647)
|
|
|
110 |
input_image = input_image.convert("RGB").resize((int(size1 / size2 * 1024), 1024))
|
111 |
|
112 |
img = np.array(input_image.convert("RGB"))
|
113 |
+
|
|
|
114 |
H = int(np.shape(img)[0] - np.shape(img)[0] % 16)
|
115 |
+
W = int(np.shape(img)[1] - np.shape(img)[1] % 16)
|
116 |
+
|
117 |
+
input_image = input_image.resize((W, H))
|
118 |
+
uploaded_mask = uploaded_mask.resize((W, H))
|
119 |
|
120 |
if seed == -1:
|
121 |
seed = random.randint(1, 2147483647)
|