theSure commited on
Commit
1312e5e
Β·
verified Β·
1 Parent(s): c27a6b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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
- input_image = input_image.resize((H, W))
118
- uploaded_mask = uploaded_mask.resize((H, W))
 
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)