Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry Not Found Error for JSON file when using OpenCLIP ViT-H/14 #521

Open
jellyheadandrew opened this issue May 7, 2023 · 0 comments
Open

Comments

@jellyheadandrew
Copy link

jellyheadandrew commented May 7, 2023

Hi, thanks for open-sourcing the OpenCLIP.

I'm trying to use your OpenCLIP ViT-H/14, but am facing problems when I follow the exact instructions provided in Huggingface repo (https://huggingface.co/laion/CLIP-ViT-H-14-frozen-xlm-roberta-large-laion5B-s13B-b90k).

Specifically, I tried:

import open_clip

model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:laion/CLIP-ViT-H-14-frozen-xlm-roberta-large-laion5B-s13B-b90k')
tokenizer = open_clip.get_tokenizer('hf-hub:laion/CLIP-ViT-H-14-frozen-xlm-roberta-large-laion5B-s13B-b90k')

However, I am facing following errors:

=========================================================

Traceback (most recent call last):
File "/home/somewheresomewhereanaconda/lib/python3.9/site-packages/huggingface_hub/utils/_errors.py", line 259, in hf_raise_for_status
response.raise_for_status()
File "/home/somewheresomewhereanaconda/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/laion/CLIP-ViT-H-14-frozen-xlm-roberta-large-laion5B-s13B-b90k/resolve/main/open_clip_config.json

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/somewheresomewhere.py", line 205, in
sd = FUNCTION(device, opt.sd_version)
File "/home/somewheresomewhere.py", line 66, in init
model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:laion/CLIP-ViT-H-14-frozen-xlm-roberta-large-laion5B-s13B-b90k')
File "/home/somewheresomewhereanaconda/lib/python3.9/site-packages/open_clip/factory.py", line 292, in create_model_and_transforms
model = create_model(
File "/home/somewheresomewhereanaconda/lib/python3.9/site-packages/open_clip/factory.py", line 127, in create_model
config_path = download_pretrained_from_hf(model_id, filename='open_clip_config.json', cache_dir=cache_dir)
File "/home/somewheresomewhereanaconda/lib/python3.9/site-packages/open_clip/pretrained.py", line 373, in download_pretrained_from_hf
cached_file = hf_hub_download(model_id, filename, revision=revision, cache_dir=cache_dir)
File "/home/somewheresomewhereanaconda/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn
return fn(*args, **kwargs)
File "/home/somewheresomewhereanaconda/lib/python3.9/site-packages/huggingface_hub/file_download.py", line 1195, in hf_hub_download
metadata = get_hf_file_metadata(
File "/home/somewheresomewhereanaconda/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 120, in _inner_fn
return fn(*args, **kwargs)
File "/home/somewheresomewhereanaconda/lib/python3.9/site-packages/huggingface_hub/file_download.py", line 1541, in get_hf_file_metadata
hf_raise_for_status(r)
File "/home/somewheresomewhereanaconda/lib/python3.9/site-packages/huggingface_hub/utils/_errors.py", line 269, in hf_raise_for_status
raise EntryNotFoundError(message, response) from e
huggingface_hub.utils._errors.EntryNotFoundError: 404 Client Error. (Request ID: Root=someID)

Entry Not Found for url: https://huggingface.co/laion/CLIP-ViT-H-14-frozen-xlm-roberta-large-laion5B-s13B-b90k/resolve/main/open_clip_config.json.

=========================================================

Seems the JSON file is not available. Any solutions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant