Spaces:
Running
on
Zero
Running
on
Zero
Update tinychart/mm_utils.py
Browse files- tinychart/mm_utils.py +1 -1
tinychart/mm_utils.py
CHANGED
@@ -32,7 +32,7 @@ def process_images(images, image_processor, model_cfg):
|
|
32 |
new_images = []
|
33 |
if image_aspect_ratio == 'pad':
|
34 |
for image in images:
|
35 |
-
image = expand2square(image, tuple(int(x*255) for x in image_processor.image_mean))
|
36 |
image = image_processor.preprocess(image, return_tensors='pt')['pixel_values'][0]
|
37 |
new_images.append(image)
|
38 |
elif image_aspect_ratio == "anyres":
|
|
|
32 |
new_images = []
|
33 |
if image_aspect_ratio == 'pad':
|
34 |
for image in images:
|
35 |
+
image = expand2square(image, tuple(int(float(x)*255) for x in image_processor.image_mean))
|
36 |
image = image_processor.preprocess(image, return_tensors='pt')['pixel_values'][0]
|
37 |
new_images.append(image)
|
38 |
elif image_aspect_ratio == "anyres":
|