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

16GB VRAM Usage #119

Closed
markhill343 opened this issue Sep 21, 2024 · 2 comments
Closed

16GB VRAM Usage #119

markhill343 opened this issue Sep 21, 2024 · 2 comments

Comments

@markhill343
Copy link

Hi!

first i wanted to thank you for the project!

I have 16GB VRAM available.
While running Image2Video the VRAM usage never exeeds ~8gb

Settings i used:
grafik

Nvidia-smi
grafik

Vram usage:
Screenshot 2024-09-21 154317

Code Extract:
grafik
The result from the low vram calc results in 15.99 which is of course smaller than 16. Is this expected behaviour?
Can this be altered or would it result in a overflow of VRAM and a crash?

@tin2tin
Copy link
Owner

tin2tin commented Sep 21, 2024

Hi @markhill343

You could change the limit value to lower that line (save the script, F3 > reload scripts), and see how long it'll take. (If you're not familiar with dev in Blender, here are some hints for fast tweaking of a script: #105 (comment) )

These are the optimize functions:

if gfx_device == "mps":

The challenging part is staying below overshooting the VRAM because offloading into the Static Memory will slow things. AFAIR is the "hi" vram code demanding around 18 GB VRAM. And going directly to CUDA it's around 35-36 GB of VRAM. For me with 24 GB VRAM it's faster render to stay below 18 GB than 35 GB.

Let me know how it goes. Are you on Windows?

@markhill343
Copy link
Author

yes i am on windows.

You are absolutly right!

"low_vram" settings with about 8gb: ~15s/it
Then i just changed the "low_vram" limit from a 16 into a 15 in the init.py and did 2 runs.

The first time it seemed to not overspil into the ram: ~24s/it
The second time it did resulting in a really bad time: ~67s/it

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