Unverified Commit 00bd08ed authored by Russell Bryant's avatar Russell Bryant Committed by GitHub
Browse files

[Security] Respect user trust_remote_code setting in NemotronVL and KimiK25 (#36192)


Signed-off-by: default avatarRussell Bryant <rbryant@redhat.com>
parent 43f10573
......@@ -174,7 +174,8 @@ class KimiK25ProcessingInfo(BaseProcessingInfo):
self.hf_config = self.get_hf_config()
self.media_token_id = self.hf_config.media_placeholder_token_id
media_processor = cached_get_image_processor(
self.ctx.model_config.model, trust_remote_code=True
self.ctx.model_config.model,
trust_remote_code=self.ctx.model_config.trust_remote_code,
)
self.media_processor = media_processor
self.hf_processor = MoonshotKimiVAutoProcessor(
......
......@@ -402,6 +402,7 @@ class LlamaNemotronVLChatModel(nn.Module, SupportsMultiModal, SupportsPP, Suppor
multimodal_config = vllm_config.model_config.multimodal_config
self.config = config
self.model_config = vllm_config.model_config
self.multimodal_config = multimodal_config
self._patch_quant_config(config, quant_config)
......@@ -456,7 +457,10 @@ class LlamaNemotronVLChatModel(nn.Module, SupportsMultiModal, SupportsPP, Suppor
*,
prefix: str,
):
return AutoModel.from_config(config.vision_config, trust_remote_code=True)
return AutoModel.from_config(
config.vision_config,
trust_remote_code=self.model_config.trust_remote_code,
)
def _init_mlp1(
self,
......
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