Dreambooth-Stable-Diffusion
Dreambooth-Stable-Diffusion copied to clipboard
NameError: name 'trainer' is not defined
Traceback (most recent call last):
File "E:\ai\sd\dbsdo\main.py", line 643, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:\ai\sd\dbsdo\main.py", line 860, in
what's the code that gave you this error
same error here. Running the training step
python main.py --base configs/stable-diffusion/v1-finetune_unfrozen.yaml
-t
--actual_resume /path/to/original/stable-diffusion/sd-v1-4-full-ema.ckpt
-n <job name>
--gpus 0,
--data_root /root/to/training/images
--reg_data_root /root/to/regularization/images
--class_word <xxx>
I think the issue is the main.py is wrapped in a massive try catch and if there is an exception before defining the trainer
instance, well, it just explodes with a non descriptive error.
In my case, the TestTubeLogger setup by default in this repo config is not supported anymore by pytorch lighting.
Changing this line and this line to CSVLogger
UPDATE just do yourself a favor and install a fairly old version of pytorch lighting 1.5.9, it will fix this issue and other ones you will see.
I am having this exact same error code, however installing the older version of pytorch-lightning hasn't fixed the issue. any other ideas would be much appreciated!!
Deleting the Conda Enviroment, reinstalling SD, and copying(replacing some 70ish files) the dreambooth repo into the SD one fixed it for me.
@davidmcw289 hi. I have same ıssue. How could you solve this? Can you tell it more detail, please. I dont understand now. Thank you