Skip to content

Commit

Permalink
fix hf clip to onnx issue
Browse files Browse the repository at this point in the history
Signed-off-by: Vivian Chen <[email protected]>
  • Loading branch information
xuanzic committed Aug 7, 2024
1 parent 23fb64e commit c2222cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nemo/export/multimodal/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def forward(self, images):
return vision_x

encoder = AutoModel.from_pretrained(
vision_config["from_pretrained"], torch_dtype=torch.bfloat16, trust_remote_code=True
vision_config["from_pretrained"], torch_dtype=torch.bfloat16, trust_remote_code=True, attn_implementation='eager'
)
vision_encoder = encoder.vision_model
hf_config = encoder.config
Expand Down Expand Up @@ -326,7 +326,7 @@ def forward(self, images):
return vision_x

encoder = AutoModel.from_pretrained(
vision_config["from_pretrained"], torch_dtype=torch.bfloat16, trust_remote_code=True
vision_config["from_pretrained"], torch_dtype=torch.bfloat16, trust_remote_code=True, attn_implementation='eager'
)
vision_encoder = encoder.vision_model
hf_config = encoder.config
Expand Down

0 comments on commit c2222cd

Please sign in to comment.