sczhou / Upscale-A-Video

[CVPR 2024] Upscale-A-Video: Temporal-Consistent Diffusion Model for Real-World Video Super-Resolution
Other
1.02k stars 54 forks source link

Inference uses huggingface_hub API that no longer exists #27

Open iv2985 opened 1 month ago

iv2985 commented 1 month ago

Tried running various examples and module errors are immediate:

python inference_upscale_a_video.py -i ./inputs/old_video_1.mp4 -o ./results -n 150 -g 9 -s 30
Traceback (most recent call last):
  File "/data/code/msm/upscale39/inference_upscale_a_video.py", line 39, in <module>
    from models_video.RAFT.raft_bi import RAFT_bi
  File "/data/code/msm/upscale39/models_video/__init__.py", line 1, in <module>
    from .autoencoder_kl_cond_video import AutoencoderKLVideo
  File "/data/code/msm/upscale39/models_video/autoencoder_kl_cond_video.py", line 23, in <module>
    from diffusers.configuration_utils import ConfigMixin, register_to_config
  File "/data/miniconda3/envs/upscale39/lib/python3.9/site-packages/diffusers/__init__.py", line 3, in <module>
    from .configuration_utils import ConfigMixin
  File "/data/miniconda3/envs/upscale39/lib/python3.9/site-packages/diffusers/configuration_utils.py", line 34, in <module>
    from .utils import (
  File "/data/miniconda3/envs/upscale39/lib/python3.9/site-packages/diffusers/utils/__init__.py", line 38, in <module>
    from .dynamic_modules_utils import get_class_from_dynamic_module
  File "/data/miniconda3/envs/upscale39/lib/python3.9/site-packages/diffusers/utils/dynamic_modules_utils.py", line 29, in <module>
    from huggingface_hub import HfFolder, cached_download, hf_hub_download, model_info
ImportError: cannot import name 'cached_download' from 'huggingface_hub' (/data/miniconda3/envs/upscale39/lib/python3.9/site-packages/huggingface_hub/__init__.py

This issue below "cached_download no longer exists on hugging face" claims huggingface has removed cached_download API entirely from its website ... it is no longer available for any package version, which permanently breaks the current inference implementation. https://github.com/TencentARC/InstantMesh/issues/169

codecowboy commented 3 days ago

Same here. Do you have a fix for this?

I changed the hugging face version as suggested elsewhere but then get an error in from the diffusers package.

Edit:

Making this edit fixed this initial issue.

Line 29 /home/Upscale-A-Video/.venv/lib/python3.10/site-packages/diffusers/utils/dynamic_modules_utils.py

remove cached_download from import statement

However I then hit a CUDA OOM error. I think this might need a much beefier card than a 3090 though it's unclear how much VRAM I would need.