Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug(?)] Training takes much longer when using --cache_latents_to_disk #438

Closed
Linaqruf opened this issue Apr 23, 2023 · 2 comments
Closed

Comments

@Linaqruf
Copy link
Contributor

Linaqruf commented Apr 23, 2023

Hi! Thanks for implementing --cache_latents_to_disk. It saves a lot of time as we don't need to use prepare_buckets_and_latents.py to save .npz files to disk, but instead we can save them directly when training.

However, I'm encountering a problem when using the --cache_latents_to_disk argument. The training takes longer time (it/s) than using the usual --cache_latents. Is this intended or a bug? Because, I thought that latent caching has its own process that is separate from the training.

Using --cache_latents_to_disk
image

Using --cache_latents
image

config_file.toml : https://dpaste.com/B6AVPNK2K#

Thank you!

@kohya-ss
Copy link
Owner

--cache_latents option is also necessary to enable the disk caching, not only --cache_latents_to_disk. Sorry for confusion.

I will add the feature to enable --cache_latents option automatically when --cache_latents_to_disk is specified.

@Linaqruf
Copy link
Contributor Author

Oh! I'm sorry, I thought it was separate args 😅
Thank you for explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants