vits icon indicating copy to clipboard operation
vits copied to clipboard

Reduce RAM usage: remove excess workers

Open nikich340 opened this issue 2 years ago • 3 comments

Leaving 8 workers lead to x8 times more RAM usage when preloading mel spectrograms, when it is not needed for single-process training.

nikich340 avatar Jan 19 '23 10:01 nikich340

It shouldn't be added to the official codebase, generally, people want to benefit from multiprocessing.

Have you looked into the commit? It changes hardcoded behaviour "I have 8 gpus, use 8 train loaders" to "I have N gpus, use N train loaders". I am sure most of people using this repo don't have 8 gpus and so much RAM for useless loader copies.

nikich340 avatar Jun 12 '23 04:06 nikich340

@nikich340 num_workers has nothing to do with the number of GPUs you have.

lexkoro avatar Jun 13 '23 15:06 lexkoro

@nikich340 num_workers has nothing to do with the number of GPUs you have.

Ok, then there still should be a way to check if user really needs this, when every worker uses 4 gb of ram and it overfits real memory, using swap file give no benefit at all.

nikich340 avatar Jun 14 '23 06:06 nikich340