Skip to content

ImportError: cannot import name 'cached_download' from 'huggingface_hub' #3

@bowieshi

Description

@bowieshi

Hi. Thanks for your great work. I am trying to reproduce your work but got some errors when running bash scripts/generate_2d_hoi_images.sh --dataset "ComAsset" --category "axe" --device 0 --skip_done.
I got the following errors when huggingface-hub version is 0.34.0:

Blender quit
Cleaning temporary directory
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:00<00:00, 103244.41it/s]
Traceback (most recent call last):
  File "/media/boao/Data/4d/code/baseline/david/src/generation/generate_images.py", line 2, in <module>
    from diffusers.utils import load_image
  File "/home/boao/anaconda3/envs/david/lib/python3.10/site-packages/diffusers/__init__.py", line 3, in <module>
    from .configuration_utils import ConfigMixin
  File "/home/boao/anaconda3/envs/david/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 34, in <module>
    from .utils import (
  File "/home/boao/anaconda3/envs/david/lib/python3.10/site-packages/diffusers/utils/__init__.py", line 37, in <module>
    from .dynamic_modules_utils import get_class_from_dynamic_module
  File "/home/boao/anaconda3/envs/david/lib/python3.10/site-packages/diffusers/utils/dynamic_modules_utils.py", line 28, in <module>
    from huggingface_hub import HfFolder, cached_download, hf_hub_download, model_info
ImportError: cannot import name 'cached_download' from 'huggingface_hub' (/home/boao/anaconda3/envs/david/lib/python3.10/site-packages/huggingface_hub/__init__.py)

I use the diffusers version of 0.20.2. I tried with huggingface-hub version of 0.25.0 and 0.33.4 but got errors. Can I ask how can I address this error? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions