remove force channels_last in Idefics3MultiModalProcessor (#48467)
Signed-off-by: Yan Ma <yan.ma@intel.com>
Yan Ma committed
Jul 13, 2026 at 22:18 UTC
c2c9f7c5e2445fc83137165c502326684bd98910
1 file changed
+4
-1
vllm/model_executor/models/idefics3.py
+4
-1
@@ -310,7 +310,10 @@ class Idefics3MultiModalProcessor(BaseMultiModalProcessor[Idefics3ProcessingInfo
310
prompt_ids = self._apply_hf_processor_tokens_only(prompt_ids)
311
return BatchFeature(dict(input_ids=[prompt_ids]), tensor_type="pt")
312
313
- mm_kwargs = {"input_data_format": "channels_last", **mm_kwargs}
313
+ image_processor = self.info.get_hf_processor().image_processor
314
+ if getattr(image_processor, "backend", "pil") == "pil":
315
+ mm_kwargs = {"input_data_format": "channels_last", **mm_kwargs}
316
+
317
processed_outputs = super()._call_hf_processor(
318
prompt,
319
mm_data,