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

Training setup fails with error AttributeError: 'FrozenDict' object has no attribute 'prediction_type' #860

Open
hargup opened this issue Dec 4, 2022 · 5 comments

Comments

@hargup
Copy link

hargup commented Dec 4, 2022

The config attributes {'set_alpha_to_one': False, 'skip_prk_steps': True, 'steps_offset': 1} were passed to DDPMScheduler, but are not expected and will be ignored. Please verify your scheduler_config.json configuration file.
  0% 0/3000 [00:00<?, ?it/s] pila
<img width="1388" alt="Screenshot 2022-12-03 at 9 04 42 PM" src="https://user-images.githubusercontent.com/2477788/205475451-bd5f69ee-46a6-4050-a0f5-946ccf1e0d45.png">
uua   pilauua  Traceback (most recent call last):
  File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 797, in <module>
    main()
  File "/content/diffusers/examples/dreambooth/train_dreambooth.py", line 656, in main
    if noise_scheduler.config.prediction_type == "epsilon":
AttributeError: 'FrozenDict' object has no attribute 'prediction_type'
  0% 0/3000 [00:06<?, ?it/s]
Traceback (most recent call last):
  File "/usr/local/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/accelerate/commands/accelerate_cli.py", line 43, in main
    args.func(args)
  File "/usr/local/lib/python3.8/dist-packages/accelerate/commands/launch.py", line 837, in launch_command
    simple_launcher(args)
  File "/usr/local/lib/python3.8/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', '/content/diffusers/examples/dreambooth/train_dreambooth.py', '--image_captions_filename', '--train_only_unet', '--Session_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/dua_lipa', '--save_starting_step=500', '--save_n_steps=500', '--pretrained_model_name_or_path=/content/stable-diffusion-v1-5', '--instance_data_dir=/content/gdrive/MyDrive/Fast-Dreambooth/Sessions/dua_lipa/instance_images', '--output_dir=/content/models/dua_lipa', '--instance_prompt=', '--seed=926688', '--resolution=512', '--mixed_precision=fp16', '--train_batch_size=1', '--gradient_accumulation_steps=1', '--gradient_checkpointing', '--use_8bit_adam', '--learning_rate=2e-6', '--lr_scheduler=polynomial', '--lr_warmup_steps=0', '--max_train_steps=3000']' returned non-zero exit status 1.
Something went wrong

Screenshot 2022-12-03 at 9 06 18 PM

@TheLastBen
Copy link
Owner

Did you load a custom model ?

@hargup
Copy link
Author

hargup commented Dec 4, 2022

No, it is the vannila notebook. I ran it again and magically it is running this time 🤷🏼‍♂️
Screenshot 2022-12-03 at 10 23 21 PM

@TheLastBen
Copy link
Owner

Great!

@acharb
Copy link

acharb commented Jan 9, 2023

I was getting the same error running dreambooth training using diffusers==0.8.0 upgrading to diffusers==0.9.0 removed the error

@TheLastBen
Copy link
Owner

You should use my fork of diffusers for the dreambooth colab, it is automatically installed at the beginning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants