diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Added --save_every option in dreambooth script.

Open lukovnikov opened this issue 2 years ago • 1 comments

Added --save_every option to the dreambooth training script. In contast to --checkpointing_steps, it saves the model where the final model will be stored and does so independently of checkpointing settings. It is intended to make sure the model is saved at smaller intervals than checkpointing. This behavior cannot be replicated with existing options afaik, if you set a small checkpoint interval, you'll end up with many copies (each ~4GB), so you'll have to set a limit on the number of checkpoints, which will prevent you from recovering deeper checkpoints. So I think this additional option is a nice simple way to make sure the model is saved more regularly. Personally, I'm using this to trigger a generation server to generate images in a separate process using watchdog in order to not slow down the trainer.

lukovnikov avatar Feb 21 '23 12:02 lukovnikov

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

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 Mar 28 '23 15:03 github-actions[bot]

@williamberman gentle ping here

patrickvonplaten avatar Mar 30 '23 16:03 patrickvonplaten

@williamberman @sayakpaul can you take a look here?

patrickvonplaten avatar Apr 28 '23 09:04 patrickvonplaten

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 May 23 '23 15:05 github-actions[bot]

Appreciate this! But actually, the recommended way of limiting the number of saved checkpoints should be with the --checkpoints_total_limit flag

williamberman avatar May 23 '23 20:05 williamberman

Appreciate this! But actually, the recommended way of limiting the number of saved checkpoints should be with the --checkpoints_total_limit flag

But it still doesn't work expected, no? See: https://github.com/huggingface/diffusers/issues/2466

sayakpaul avatar May 24 '23 01:05 sayakpaul

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 Jun 17 '23 15:06 github-actions[bot]