lkhl commited on
Commit
d5a888e
·
verified ·
1 Parent(s): 109a929

Update image_processing_videollama3.py

Browse files
Files changed (1) hide show
  1. image_processing_videollama3.py +3 -3
image_processing_videollama3.py CHANGED
@@ -108,7 +108,7 @@ def simple_batched_resize(
108
  if is_valid_video(image):
109
  image = image[0]
110
  if isinstance(image, Image.Image):
111
- height, width = image.size
112
  else:
113
  height, width = get_image_size(image, channel_dim=input_data_format)
114
  image_sizes.append([height, width])
@@ -142,7 +142,7 @@ def batched_resize(
142
  else:
143
  num_frame = 1
144
  if isinstance(image, Image.Image):
145
- height, width = image.size
146
  else:
147
  height, width = get_image_size(image, channel_dim=input_data_format)
148
  image_sizes.append([num_frame, height, width])
@@ -175,7 +175,7 @@ def batched_resize(
175
 
176
  class Videollama3ImageProcessor(BaseImageProcessor):
177
  r"""
178
- Constructs a DAMOVL image processor that dynamically resizes images based on the original images.
179
 
180
  Args:
181
  do_resize (`bool`, *optional*, defaults to `True`):
 
108
  if is_valid_video(image):
109
  image = image[0]
110
  if isinstance(image, Image.Image):
111
+ width, height = image.size
112
  else:
113
  height, width = get_image_size(image, channel_dim=input_data_format)
114
  image_sizes.append([height, width])
 
142
  else:
143
  num_frame = 1
144
  if isinstance(image, Image.Image):
145
+ width, height = image.size
146
  else:
147
  height, width = get_image_size(image, channel_dim=input_data_format)
148
  image_sizes.append([num_frame, height, width])
 
175
 
176
  class Videollama3ImageProcessor(BaseImageProcessor):
177
  r"""
178
+ Constructs a VideoLLaMA3 image processor that dynamically resizes images based on the original images.
179
 
180
  Args:
181
  do_resize (`bool`, *optional*, defaults to `True`):