diffusers
diffusers copied to clipboard
Error for the 16gb gpu dreambooth training
Describe the bug
I can train without the prior preservation fine if I try to train with it I get “UNet2DConditionModel' object has no attribute 'enable_gradient_checkpointing'”
I also get an error that prior_loss_weight is a unrecognized argument
Reproduction
No response
Logs
No response
System Info
Ubuntu, python 3.10 ,
The enable_gradient_checkpointing
code in UNet2DConditionModel
is currently part of the dev version of diffusers
. If you clone the repo and run pip install .
you can get the updated version
I'd guess that will fix your second issue as well, but I haven't run into it so I'm not sure
Thank you ! Now I saw it actually says to do exactly that to make sure everything runs in the examples :) So I should have seen that haha. Does not fix the prior loss thing for me but I will investigate further!
Are you share you ran all the cells ? In particular, the prior_loss_weight
is defined in this cell https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/sd_dreambooth_training.ipynb#scrollTo=8i_vLTBxAXpE, so make sure you run those.
Hey ! I ran this locally so just ran the accelerate launch train_dreambooth.py Is there a comma missing here ? Thats why it cant find , Im not sure Im a bit of a newbie haha
parser.add_argument("--prior_loss_weight", type=float, default=1.0, help="The weight of prior preservation loss.")
parser.add_argument( "--num_class_images", type=int, default=100, help=( "Minimal class images for prior perversation loss. If not have enough images, additional images will be" " sampled with class_prompt." ),
Could you post the command that you used to launch ?
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.