nihaomiao / CVPR23_LFDM

The pytorch implementation of our CVPR 2023 paper "Conditional Image-to-Video Generation with Latent Flow Diffusion Models"
BSD 2-Clause "Simplified" License
432 stars 43 forks source link

demo_mug http error 403 (torch.hub.load) #33

Closed yi0109 closed 9 months ago

yi0109 commented 9 months ago

I got error when I tried to demo python demo/demo_mug.py

should i change some codes ?

def get_tokenizer():
    global TOKENIZER
    if not exists(TOKENIZER):
        TOKENIZER = torch.hub.load('huggingface/pytorch-transformers', 'tokenizer', 'bert-base-cased')
    return TOKENIZER

error message is

  File "/home/aaa/anaconda3/envs/py38_lfdm/lib/python3.8/site-packages/torch/hub.py", line 362, in load
    repo_or_dir = _get_cache_or_reload(repo_or_dir, force_reload, verbose)
  File "/home/aaa/anaconda3/envs/py38_lfdm/lib/python3.8/site-packages/torch/hub.py", line 162, in _get_cache_or_reload
    _validate_not_a_forked_repo(repo_owner, repo_name, branch)
  File "/home/aaa/anaconda3/envs/py38_lfdm/lib/python3.8/site-packages/torch/hub.py", line 124, in _validate_not_a_forked_repo
    with urlopen(url) as r:
  File "/home/aaa/anaconda3/envs/py38_lfdm/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/home/aaa/anaconda3/envs/py38_lfdm/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/home/aaa/anaconda3/envs/py38_lfdm/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/home/aaa/anaconda3/envs/py38_lfdm/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/home/aaa/anaconda3/envs/py38_lfdm/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/home/aaa/anaconda3/envs/py38_lfdm/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: rate limit exceeded
nihaomiao commented 9 months ago

Hi, @yi0109, I never have this issue before. It looks like something wrong with the internet connection. Some issues with torch.hub are proposed before in this repo and it seems that updating the torch (and other related packages) version can solve the problem.

yi0109 commented 9 months ago

Hi, @yi0109, I never have this issue before. It looks like something wrong with the internet connection. Some issues with torch.hub are proposed before in this repo and it seems that updating the torch (and other related packages) version can solve the problem.

I will check my environment again. thanks for your reply