Quick fix for loading processor for supporting internvl3_5 series (#9676)
This commit is contained in:
@@ -368,13 +368,22 @@ def get_processor(
|
|||||||
if config.model_type not in {"llava", "clip"}:
|
if config.model_type not in {"llava", "clip"}:
|
||||||
kwargs["use_fast"] = use_fast
|
kwargs["use_fast"] = use_fast
|
||||||
try:
|
try:
|
||||||
processor = AutoProcessor.from_pretrained(
|
if "InternVL3_5" in tokenizer_name:
|
||||||
tokenizer_name,
|
processor = AutoTokenizer.from_pretrained(
|
||||||
*args,
|
tokenizer_name,
|
||||||
trust_remote_code=trust_remote_code,
|
*args,
|
||||||
revision=revision,
|
trust_remote_code=trust_remote_code,
|
||||||
**kwargs,
|
revision=revision,
|
||||||
)
|
**kwargs,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
processor = AutoProcessor.from_pretrained(
|
||||||
|
tokenizer_name,
|
||||||
|
*args,
|
||||||
|
trust_remote_code=trust_remote_code,
|
||||||
|
revision=revision,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
error_message = str(e)
|
error_message = str(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user