Skip to content

How to free GPU memory #235

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

Open
boatingMen opened this issue Aug 30, 2023 · 1 comment
Open

How to free GPU memory #235

boatingMen opened this issue Aug 30, 2023 · 1 comment

Comments

@boatingMen
Copy link

When I write the text video retrieval function as a Python script, when using the function, GPU video memory increases with the increase of the number of uses (search), and the kill script is released, I want to ask whether the existing method can release video memory?

@riichg5
Copy link

riichg5 commented Sep 21, 2023

you can use torch.cuda.empty_cache() in you code at any where.

import torch
torch.cuda.empty_cache()

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