Skip to content

Commit

Permalink
Checking model_cfg instead of model_name to load CoCa model.
Browse files Browse the repository at this point in the history
  • Loading branch information
Msalehi237 authored and rwightman committed Oct 12, 2023
1 parent 7e2d222 commit 2e81704
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/open_clip/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def create_model(
if custom_text:
if is_hf_model:
model_cfg['text_cfg']['hf_model_pretrained'] = pretrained_hf
if "coca" in model_name:
if "multimodal_cfg" in model_cfg:
model = CoCa(**model_cfg, **model_kwargs, cast_dtype=cast_dtype)
else:
model = CustomTextCLIP(**model_cfg, **model_kwargs, cast_dtype=cast_dtype)
Expand Down

0 comments on commit 2e81704

Please sign in to comment.