0

I'm trying to run this code from this repository [https://github.com/showlab/Tune-A-Video], however I am facing this error when I try to run the training step as seen in the above repo.

accelerate launch train_tuneavideo.py --config="configs/man-skiing.yaml"

OSError: We couldn't connect to 'https://huggingface.co' to load this model, couldn't find it in the cached files and it looks like ./checkpoints/stable-diffusion-v1-4 is not the path to a directory containing a scheduler_config.json file.

The full printout is as follows

Traceback (most recent call last):
  File "/home/meggie/anaconda3/lib/python3.9/site-packages/diffusers/configuration_utils.py", line 326, in load_config
    config_file = hf_hub_download(
  File "/home/meggie/anaconda3/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 110, in _inner_fn
    validate_repo_id(arg_value)
  File "/home/meggie/anaconda3/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 158, in validate_repo_id
    raise HFValidationError(
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': './checkpoints/stable-diffusion-v1-4'. Use `repo_type` argument if needed.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/meggie/Documents/meg-github/Tune-A-Video/train_tuneavideo.py", line 367, in <module>
    main(**OmegaConf.load(args.config))
  File "/home/meggie/Documents/meg-github/Tune-A-Video/train_tuneavideo.py", line 105, in main
    noise_scheduler = DDPMScheduler.from_pretrained(pretrained_model_path, subfolder="scheduler")
  File "/home/meggie/anaconda3/lib/python3.9/site-packages/diffusers/schedulers/scheduling_utils.py", line 118, in from_pretrained
    config, kwargs = cls.load_config(
  File "/home/meggie/anaconda3/lib/python3.9/site-packages/diffusers/configuration_utils.py", line 363, in load_config
    raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co' to load this model, couldn't find it in the cached files and it looks like ./checkpoints/stable-diffusion-v1-4 is not the path to a directory containing a scheduler_config.json file.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/diffusers/installation#offline-mode'.
Traceback (most recent call last):
  File "/home/meggie/anaconda3/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/home/meggie/anaconda3/lib/python3.9/site-packages/accelerate/commands/accelerate_cli.py", line 45, in main
    args.func(args)
  File "/home/meggie/anaconda3/lib/python3.9/site-packages/accelerate/commands/launch.py", line 986, in launch_command
    simple_launcher(args)
  File "/home/meggie/anaconda3/lib/python3.9/site-packages/accelerate/commands/launch.py", line 628, in simple_launcher
    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)

Here's an image of the whole thing

enter image description here

I have tried to follow the suggestions here, [https://github.com/CompVis/stable-diffusion/issues/302] and [https://github.com/huggingface/diffusers/issues/579] such as downgrading the version of transformers to 4.22.1 (originally was 4.25.1) but the error remains the same.

How to fix this problem?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Megan Darcy
  • 530
  • 5
  • 15

0 Answers0