diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Error for the 16gb gpu dreambooth training

Open UglyStupidHonest opened this issue 2 years ago • 5 comments

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 ,

UglyStupidHonest avatar Sep 27 '22 17:09 UglyStupidHonest

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

ben-heil avatar Sep 28 '22 01:09 ben-heil

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!

UglyStupidHonest avatar Sep 28 '22 03:09 UglyStupidHonest

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.

patil-suraj avatar Sep 30 '22 13:09 patil-suraj

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." ),

UglyStupidHonest avatar Sep 30 '22 14:09 UglyStupidHonest

Could you post the command that you used to launch ?

patil-suraj avatar Sep 30 '22 16:09 patil-suraj

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.

github-actions[bot] avatar Oct 28 '22 15:10 github-actions[bot]