[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:
committed by
GitHub
parent
234860399b
commit
8850738b70
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user