Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting an Error #52

Closed
EranHab opened this issue Oct 21, 2022 · 2 comments
Closed

Getting an Error #52

EranHab opened this issue Oct 21, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@EranHab
Copy link

EranHab commented Oct 21, 2022

Describe the bug

I get a huge error when I fill in the steps as shown on the video by James Cunliffe here: https://www.youtube.com/watch?v=FaLTztGGueQ

I have posted the error below and the colab was a Tesla T4, 15109 MiB

This error occurs when I press "play" on the "Start Training" section.

Reproduction

Follow his steps to the letter, except change his "realjames" for something else like whatever you called your Hugging Face token.

This is my settings:

!accelerate launch train_dreambooth.py
--pretrained_model_name_or_path=$MODEL_NAME
--instance_data_dir=$INSTANCE_DIR
--class_data_dir=$CLASS_DIR
--output_dir=$OUTPUT_DIR
--with_prior_preservation --prior_loss_weight=1.0
--instance_prompt="MY TOKEN NAME"
--class_prompt="person"
--seed=1337
--resolution=512
--train_batch_size=1
--train_text_encoder
--mixed_precision="fp16"
--use_8bit_adam
--gradient_accumulation_steps=1
--learning_rate=5e-6
--lr_scheduler="constant"
--lr_warmup_steps=0
--num_class_images=50
--sample_batch_size=4
--max_train_steps=1000

Logs

The following values were not passed to `accelerate launch` and had defaults used instead:
	`--num_processes` was set to a value of `1`
	`--num_machines` was set to a value of `1`
	`--mixed_precision` was set to a value of `'no'`
	`--num_cpu_threads_per_process` was set to `1` to improve out-of-box performance
To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_errors.py", line 213, in hf_raise_for_status
    response.raise_for_status()
  File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://huggingface.co/CompVis/stable-diffusion-v1-4/resolve/main/model_index.json

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/diffusers/configuration_utils.py", line 234, in get_config_dict
    revision=revision,
  File "/usr/local/lib/python3.7/dist-packages/huggingface_hub/file_download.py", line 1057, in hf_hub_download
    timeout=etag_timeout,
  File "/usr/local/lib/python3.7/dist-packages/huggingface_hub/file_download.py", line 1359, in get_hf_file_metadata
    hf_raise_for_status(r)
  File "/usr/local/lib/python3.7/dist-packages/huggingface_hub/utils/_errors.py", line 254, in hf_raise_for_status
    raise HfHubHTTPError(str(HTTPError), response=response) from e
huggingface_hub.utils._errors.HfHubHTTPError: <class 'requests.exceptions.HTTPError'> (Request ID: ssVb9YQlJa6gYKCWwu9Tk)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "train_dreambooth.py", line 695, in <module>
    main()
  File "train_dreambooth.py", line 376, in main
    args.pretrained_model_name_or_path, torch_dtype=torch_dtype, use_auth_token=True
  File "/usr/local/lib/python3.7/dist-packages/diffusers/pipeline_utils.py", line 373, in from_pretrained
    revision=revision,
  File "/usr/local/lib/python3.7/dist-packages/diffusers/configuration_utils.py", line 256, in get_config_dict
    "There was a specific connection error when trying to load"
OSError: There was a specific connection error when trying to load CompVis/stable-diffusion-v1-4:
<class 'requests.exceptions.HTTPError'> (Request ID: ssVb9YQlJa6gYKCWwu9Tk)
Traceback (most recent call last):
  File "/usr/local/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
    args.func(args)
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
    simple_launcher(args)
  File "/usr/local/lib/python3.7/dist-packages/accelerate/commands/launch.py", line 354, in simple_launcher
    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'train_dreambooth.py', '--pretrained_model_name_or_path=CompVis/stable-diffusion-v1-4', '--instance_data_dir=/content/data/RealErnesttInput', '--class_data_dir=/content/data/person', '--output_dir=/content/drive/MyDrive/stable_diffusion_weights/sks', '--with_prior_preservation', '--prior_loss_weight=1.0', '--instance_prompt=RealErnest', '--class_prompt=person', '--seed=1337', '--resolution=512', '--train_batch_size=1', '--mixed_precision=fp16', '--use_8bit_adam', '--gradient_accumulation_steps=1', '--learning_rate=1e-6', '--lr_scheduler=constant', '--lr_warmup_steps=0', '--num_class_images=50', '--sample_batch_size=4', '--max_train_steps=800']' returned non-zero exit status 1.

System Info

Google Colab: https://colab.research.google.com/github/ShivamShrirao/diffusers/blob/main/examples/dreambooth/DreamBooth_Stable_Diffusion.ipynb

@EranHab EranHab added the bug Something isn't working label Oct 21, 2022
@jasonreposa
Copy link

You have to accept the terms to access that URL.

Click agree here and re-run: https://huggingface.co/CompVis/stable-diffusion-v1-4 (if you agree of course...)

@EranHab
Copy link
Author

EranHab commented Oct 22, 2022

Solved. Thanks a lot.

@EranHab EranHab closed this as completed Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants