TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.49k stars 1.31k forks source link

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

Open hargup opened 1 year ago

hargup commented 1 year ago
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 commented 1 year ago

Did you load a custom model ?

hargup commented 1 year ago

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 commented 1 year ago

Great!

acharb commented 1 year ago

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

TheLastBen commented 1 year ago

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