Spaces:
Running
Running
commit
Browse files
app.py
CHANGED
@@ -70,21 +70,19 @@ def process_image_4(image_path, prompt):
|
|
70 |
|
71 |
w, h = image.size
|
72 |
|
73 |
-
coor_point =
|
74 |
-
point_labels =
|
75 |
|
76 |
image = image.resize((768, 768), Image.LANCZOS).convert('RGB')
|
77 |
-
|
78 |
-
image = (to_tensor(image) - 0.5) * 2
|
79 |
|
80 |
cur_input = {
|
81 |
-
'input_images': image
|
82 |
-
'original_size':
|
83 |
-
'target_size':
|
84 |
'prompt': [cur_p],
|
85 |
'coor_point': coor_point,
|
86 |
'point_labels': point_labels,
|
87 |
-
'generator': generator
|
88 |
}
|
89 |
inputs.append(cur_input)
|
90 |
|
|
|
70 |
|
71 |
w, h = image.size
|
72 |
|
73 |
+
coor_point = []
|
74 |
+
point_labels = []
|
75 |
|
76 |
image = image.resize((768, 768), Image.LANCZOS).convert('RGB')
|
77 |
+
|
|
|
78 |
|
79 |
cur_input = {
|
80 |
+
'input_images': image,
|
81 |
+
'original_size': [[w,h]],
|
82 |
+
'target_size': [[768, 768]],
|
83 |
'prompt': [cur_p],
|
84 |
'coor_point': coor_point,
|
85 |
'point_labels': point_labels,
|
|
|
86 |
}
|
87 |
inputs.append(cur_input)
|
88 |
|