Unverified Commit 8850738b authored by Raushan Turganbay's avatar Raushan Turganbay Committed by GitHub
Browse files

[Bugfix] Fix processor signature (#36630)


Signed-off-by: default avatarraushan <raushan@huggingface.co>
Co-authored-by: default avatarHarry Mellor <19981378+hmellor@users.noreply.github.com>
parent 23486039
...@@ -28,8 +28,11 @@ class GLM4VProcessor(ProcessorMixin): ...@@ -28,8 +28,11 @@ class GLM4VProcessor(ProcessorMixin):
self, self,
tokenizer: PreTrainedTokenizer, tokenizer: PreTrainedTokenizer,
image_size: int, image_size: int,
image_processor: GLM4VImageProcessorFast | None = None,
) -> None: ) -> None:
self.tokenizer = tokenizer self.tokenizer = tokenizer
self.image_processor = GLM4VImageProcessorFast( if image_processor is None:
size={"width": image_size, "height": image_size} image_processor = GLM4VImageProcessorFast(
) size={"width": image_size, "height": image_size}
)
self.image_processor = image_processor
...@@ -29,11 +29,14 @@ class QwenVLProcessor(ProcessorMixin): ...@@ -29,11 +29,14 @@ class QwenVLProcessor(ProcessorMixin):
self, self,
tokenizer: QwenVLTokenizer, tokenizer: QwenVLTokenizer,
image_size: int, image_size: int,
image_processor: QwenVLImageProcessorFast | None = None,
) -> None: ) -> None:
self.tokenizer = tokenizer self.tokenizer = tokenizer
self.image_processor = QwenVLImageProcessorFast( if image_processor is None:
size={"width": image_size, "height": image_size} image_processor = QwenVLImageProcessorFast(
) size={"width": image_size, "height": image_size}
)
self.image_processor = image_processor
@property @property
def image_start_tag(self) -> str: def image_start_tag(self) -> str:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment