tomaarsen HF Staff commited on
Commit
6934212
·
1 Parent(s): c588694

Accept forwarded kwargs in replace_image_token (e.g. return_tensors from transformers 5.15 ProcessorMixin)

Browse files
processing_colqwen35_bidirection.py CHANGED
@@ -166,7 +166,7 @@ class ColQwen35BidirectionProcessor(ProcessorMixin):
166
  if cur_min_pixels > max_pixels:
167
  self.image_processor.min_pixels = max_pixels
168
 
169
- def replace_image_token(self, image_inputs: dict, image_idx: int) -> str:
170
  """Expand one ``<|image_pad|>`` placeholder into its per-image token run.
171
 
172
  ``ProcessorMixin.__call__`` delegates placeholder expansion here, and
 
166
  if cur_min_pixels > max_pixels:
167
  self.image_processor.min_pixels = max_pixels
168
 
169
+ def replace_image_token(self, image_inputs: dict, image_idx: int, **kwargs) -> str:
170
  """Expand one ``<|image_pad|>`` placeholder into its per-image token run.
171
 
172
  ``ProcessorMixin.__call__`` delegates placeholder expansion here, and