Skip to content

Commit

Permalink
fix loading clip vision model (#12566)
Browse files Browse the repository at this point in the history
  • Loading branch information
patil-suraj authored Jul 7, 2021
1 parent b868260 commit d7e156b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ def __init__(self, projection_dim=512, **kwargs):

if vision_model_type == "clip":
self.vision_config = AutoConfig.for_model(vision_model_type, **vision_config).vision_config
elif vision_model_type == "clip_vision_model":
from transformers import CLIPVisionConfig

self.vision_config = CLIPVisionConfig(**vision_config)
else:
self.vision_config = AutoConfig.for_model(vision_model_type, **vision_config)

Expand Down

0 comments on commit d7e156b

Please sign in to comment.