fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

I'm getting UnboundLocalError: local variable 'text_encoder' referenced before assignment after completing model training

Open aaiguy opened this issue 3 years ago • 1 comments

While training dreambooth model on colab I'm getting below error.

Steps: 100% 1500/1500 [23:03<00:00,  1.09it/s, loss=0.297, lr=5e-6]Traceback (most recent call last):
  File "train_dreambooth.py", line 677, in <module>
    main()
  File "train_dreambooth.py", line 665, in main
    text_encoder=accelerator.unwrap_model(text_encoder),
UnboundLocalError: local variable 'text_encoder' referenced before assignment
Steps: 100% 1500/1500 [23:03<00:00,  1.08it/s, loss=0.297, lr=5e-6]
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_p

why am I getting this ?

aaiguy avatar Oct 19 '22 09:10 aaiguy

make sure you use the latest colab notebook

TheLastBen avatar Oct 19 '22 14:10 TheLastBen

I'm receiving this error right now on RunPod :fast-stable-diffusion-1.3.1 on RNPD-Dreambooth-v2.ipynb. I have 5 GB Disk, 100 GB Volume, RTX A5000.

cbrwizard avatar Mar 31 '23 14:03 cbrwizard

increase the disk size to 20

TheLastBen avatar Mar 31 '23 15:03 TheLastBen