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

VAE caching & bucketing #50

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

VAE caching & bucketing #50

wants to merge 19 commits into from

Conversation

Muinez
Copy link

@Muinez Muinez commented Nov 26, 2024

Implemented caching for VAE embeddings and local bucketing support.

I decided not to implement caching for text embeddings because they consume an excessive amount of disk space, and the text model is not as resource-intensive as the VAE. Additionally, I removed a significant amount of code from the training script. I hope this won't cause issues, as the primary goal is to make it easier for users to at least run training locally without complications.

@recoilme
Copy link

@Muinez looks like you forgot save model by epoch and on train ending

@recoilme
Copy link

@Muinez i add load/save model code and fix some bugs and add config and step by step example
Muinez#1

ps: i dont know python (but write on 5 other langs), pls check

@Manni1000
Copy link

i think if we added 8-bit Adam support it could train with 24gb vram

@Muinez
Copy link
Author

Muinez commented Dec 4, 2024

@Muinez, how big were your cached text embeddings? If they were over 2mb, you may have accidently used the language model encoder instead of the decoder. The difference for me was ~1.4mb vs something ridiculous like 20mb+ per caption - I quite don't remember.

I'm not exactly sure which language model encoder you're referring to, but in my case, the size was around 300 * 2304 * 2, which is roughly 1.3MB, just as you mentioned. As for the 20MB size you experienced, it might have been because you needed to .clone() the tensor before saving

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

Successfully merging this pull request may close these issues.

6 participants