km2ii / JVP_TG-PLUS

This is enhanced mod for javplayer, enhance the effect after removing mosaic.
319 stars 66 forks source link

Adjust VRAM usage per TG-PLUS thread #110

Closed SyntaxError1871 closed 1 year ago

SyntaxError1871 commented 1 year ago

Hello,

Is there any way to adjust the amount of VRAM utilized per TG-PLUS thread?

The Javplayer settings seems to control the amount of threads that can run but I do not see any setting anywhere in config file or application to adjust maximum VRAM per thread. I have RTX 3090 with 24GB of VRAM so I want to maximize amounts of threads without completely maxing out memory (to like 22GB usage if possible) to be more efficient. I can currently do 2 threads maximum because if I go over 2 threads I go over 24GB of VRAM usage and things can error out, but I think this can be more efficient since core utilization is relatively low while VRAM usage is high so if I can adjust threads to 4 and cap VRAM usage per thread to like 5GB each that would be ideal.

image

km2ii commented 1 year ago

Limiting the vrm does not reduce vam requirements.

idl-polun commented 1 year ago

Just like your case, 4090 sometimes run out of memory especially with tecogan-da model. tecogan-da uses 2 threads, bvpp 3 or 4 threads in my environment otherwise kernel panic may occur.