[Bugfix] Fix processor signature (#36630)

Signed-off-by: raushan <raushan@huggingface.co>
Co-authored-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Raushan Turganbay
2026-03-10 14:20:47 +01:00
committed by GitHub
parent 234860399b
commit 8850738b70
2 changed files with 12 additions and 6 deletions

View File

@@ -28,8 +28,11 @@ class GLM4VProcessor(ProcessorMixin):
self,
tokenizer: PreTrainedTokenizer,
image_size: int,
image_processor: GLM4VImageProcessorFast | None = None,
) -> None:
self.tokenizer = tokenizer
self.image_processor = GLM4VImageProcessorFast(
size={"width": image_size, "height": image_size}
)
if image_processor is None:
image_processor = GLM4VImageProcessorFast(
size={"width": image_size, "height": image_size}
)
self.image_processor = image_processor

View File

@@ -29,11 +29,14 @@ class QwenVLProcessor(ProcessorMixin):
self,
tokenizer: QwenVLTokenizer,
image_size: int,
image_processor: QwenVLImageProcessorFast | None = None,
) -> None:
self.tokenizer = tokenizer
self.image_processor = QwenVLImageProcessorFast(
size={"width": image_size, "height": image_size}
)
if image_processor is None:
image_processor = QwenVLImageProcessorFast(
size={"width": image_size, "height": image_size}
)
self.image_processor = image_processor
@property
def image_start_tag(self) -> str: