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

Dreambooth colab - add option to reset cuda memory #45

Closed
jmp909 opened this issue Oct 20, 2022 · 2 comments
Closed

Dreambooth colab - add option to reset cuda memory #45

jmp909 opened this issue Oct 20, 2022 · 2 comments

Comments

@jmp909
Copy link

jmp909 commented Oct 20, 2022

Is your feature request related to a problem? Please describe.
Sometimes retraining in the same session gives a CUDA memory allocation error

Describe the solution you'd like
suggest potentially adding this as an option to clear memory:

pip install numba

then

from numba import cuda 
device = cuda.get_current_device()
device.reset()

worked for me!

thanks

@ShivamShrirao
Copy link
Owner

I was thinking of just doing

exit()

Does it work for you or cause any problems ?

@jmp909
Copy link
Author

jmp909 commented Oct 20, 2022

@ShivamShrirao which line are you putting the exit() on? also where would you re-run from?

normally I will just want to run the block to change the MODEL_NAME and OUTPUT_DIR then run the training again to create a an updated copy of the model

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