bytedance / bytedance/FaceCLIP
跑不起来:Pretrained weights (metaclip_fullcc) not found for model ViT-bigG-14
- Dominant language
- Python
- Stars
- 42
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
```
WARNING:root:Pretrained weights (metaclip_fullcc) not found for model ViT-bigG-14. Available pretrained tags (['laion2b_s39b_b160k'].
Traceback (most recent call last):
File "/home/cy/face/FaceCLIP/core/util/common.py", line 74, in instantiate_from_config
return klass(**params, **kwargs)
File "/home/cy/face/FaceCLIP/core/face_clip/face_clip.py", line 397, in __init__
self._init_text_tower_from_pretrained(text_model_name, pretrained)
File "/home/cy/face/FaceCLIP/core/face_clip/face_clip.py", line 402, in _init_text_tower_from_pretrained
model, _, preprocess = open_clip.create_model_and_transforms(text_model_name, pretrained=pretrained)
File "/home/cy/face/FaceCLIP/core/face_clip/open_clip/factory.py", line 429, in create_model_and_transforms
model = create_model(
File "/home/cy/face/FaceCLIP/core/face_clip/open_clip/factory.py", line 341, in create_model
raise RuntimeError(error_str)
RuntimeError: Pretrained weights (metaclip_fullcc) not found for model ViT-bigG-14. Available pretrained tags (['laion2b_s39b_b160k'].
```
跟了下代码,加载ViT-bigG-14时,读取了配置文件face_clip_g_14_config.yaml:
```
model:
text_image_branch_config:
target: core.face_clip.face_clip.TextImageBranch
instance_name: text_image_branch
trainable: true
params:
text_embed_dim: 1280
init_logit_bias: -10
cast_dtype: torch.bfloat16
text_model_name: ViT-bigG-14
pretrained: metaclip_fullcc
face_model_path: ""
```
因为这里的pretrained是metaclip_fullcc,所以导致下面代码获取的checkpoint_path为空字符串:
```
if pretrained:
checkpoint_path = ''
pretrained_cfg = get_pretrained_cfg(model_name, pretrained)
if pretrained_cfg:
checkpoint_path = download_pretrained(pretrained_cfg, cache_dir=cache_dir)
preprocess_cfg = merge_preprocess_dict(preprocess_cfg, pretrained_cfg)
elif os.path.exists(pretrained):
checkpoint_path = pretrained
```
配置有问题?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.