[Bugfix] Quick fix to make Pixtral-HF load correctly again after 39e227c7ae. (#11024)
This commit is contained in:
@@ -218,12 +218,8 @@ class LlavaProcessor(BaseMultiModalProcessor):
|
|||||||
image_processor = hf_processor.image_processor # type: ignore
|
image_processor = hf_processor.image_processor # type: ignore
|
||||||
hf_inputs = image_processor.preprocess(data['image'],
|
hf_inputs = image_processor.preprocess(data['image'],
|
||||||
return_tensors="pt")
|
return_tensors="pt")
|
||||||
is_pixtral = isinstance(hf_processor, PixtralProcessor)
|
|
||||||
|
|
||||||
return MultiModalKwargs(
|
return MultiModalKwargs(**hf_inputs)
|
||||||
**hf_inputs,
|
|
||||||
is_pixtral=torch.tensor(is_pixtral),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class LlavaLikeConfig(Protocol):
|
class LlavaLikeConfig(Protocol):
|
||||||
|
|||||||
Reference in New Issue
Block a user