OneTrainer icon indicating copy to clipboard operation
OneTrainer copied to clipboard

[Bug]: after using caption generation, the model stays in memory and if you immediately go to start training, it doesn't remove

Open gnewtzie opened this issue 1 year ago • 3 comments

What happened?

loaded up one trainer and fixed model paths etc.. go to tools and dataset tools then generate captions... if you generate them but don't restart, the models are still in gpu memory and never get cleared. this causes training to overflow on my machine to ram. if i restart, it does not present a problem.

it can easily be reproduced by simply running caption generation and watching gpu memory usage. then run training and you will see that the blip models don't get purged from memory.

What did you expect would happen?

the blip or blip2 model should clear memory when i'm done generating captions

Relevant log output

I don't have this.

Output of pip freeze

No response

gnewtzie avatar Mar 14 '24 00:03 gnewtzie

What happened?

loaded up one trainer and fixed model paths etc.. go to tools and dataset tools then generate captions... if you generate them but don't restart, the models are still in gpu memory and never get cleared. this causes training to overflow on my machine to ram. if i restart, it does not present a problem.

it can easily be reproduced by simply running caption generation and watching gpu memory usage. then run training and you will see that the blip models don't get purged from memory.

What did you expect would happen?

the blip or blip2 model should clear memory when i'm done generating captions

Relevant log output

I don't have this.

Output of pip freeze

No response

Please update and confirm if this still occurs. I do not use the inbuilt models to caption and instead use external tools like Dataset Helpers and Taggui. Both on github.

O-J1 avatar Oct 13 '24 15:10 O-J1

@gnewtzie Can you please confirm if this still occurs? I will close this in a week if there is no response

O-J1 avatar Nov 04 '24 02:11 O-J1

did one tonight and the gpu memory stayed higher prior to doing the captioning. seems like the model is still in ram.

gnewtzie avatar Nov 08 '24 01:11 gnewtzie

Finally closed.

O-J1 avatar Nov 18 '25 20:11 O-J1