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

torch.hub.load error #29

Closed chenbolin-master closed 9 months ago

chenbolin-master commented 10 months ago

TOKENIZER = torch.hub.load('huggingface/pytorch-transformers', 'tokenizer', 'bert-base-cased') meet errors :

File "/usr/lib/python3.8/importlib/metadata.py", line 169, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: regex

File "/root/.cache/torch/hub/huggingface_pytorch-transformers_main/src/transformers/utils/versions.py", line 104, in require_version raise importlib.metadata.PackageNotFoundError( importlib.metadata.PackageNotFoundError: The 'regex!=2019.12.17' distribution was not found and is required by this application. Try: pip install transformers -U or pip install -e '.[dev]' if you're working with git main

chenbolin-master commented 10 months ago

TOKENIZER = torch.hub.load('huggingface/pytorch-transformers', 'tokenizer', 'bert-base-cased') MODEL = torch.hub.load('huggingface/pytorch-transformers', 'model', 'bert-base-cased')

how to download them by url ? My network can not download by torch.hub.load .

LargeRaindrop commented 9 months ago

TOKENIZER = torch.hub.load('huggingface/pytorch-transformers', 'tokenizer', 'bert-base-cased') meet errors :

File "/usr/lib/python3.8/importlib/metadata.py", line 169, in from_name raise PackageNotFoundError(name) importlib.metadata.PackageNotFoundError: regex

File "/root/.cache/torch/hub/huggingface_pytorch-transformers_main/src/transformers/utils/versions.py", line 104, in require_version raise importlib.metadata.PackageNotFoundError( importlib.metadata.PackageNotFoundError: The 'regex!=2019.12.17' distribution was not found and is required by this application. Try: pip install transformers -U or pip install -e '.[dev]' if you're working with git main

I have encountered the same problem as you. Just use pip install transformers -U to update the package transformers.