williamyang1991 / VToonify

[SIGGRAPH Asia 2022] VToonify: Controllable High-Resolution Portrait Video Style Transfer
Other
3.53k stars 442 forks source link

How set GPU number? #57

Closed wang1309 closed 1 year ago

wang1309 commented 1 year ago

when I use this command "python style_transfer.py --scale_image --content ./data/YOUR_VIDEO.mp4 --video " , How can i set my gpu number, my computer have four GPU, but only use one,i wat use four gpu, thx

williamyang1991 commented 1 year ago

Only training code supports multi-GPU training The testing code is not for multi-GPU

wang1309 commented 1 year ago

ok, thx, can i modify some code for support it? when i train , it always "out of memory" because i want support more big video size, deault only support [200,200,200,200], I want full size video

williamyang1991 commented 1 year ago

If you want to load a large video, you can use a small batch size, e.g., --batch_size 1

wang1309 commented 1 year ago

If you want to load a large video, you can use a small batch size, e.g., --batch_size 1

thx your reply. yes, I am so do, but to slowly, 15 mins video train cost 7-8 hours

williamyang1991 commented 1 year ago

Maybe you can crop the face region, toonify this region, paste and blend it back to the original frame. Or you can refer to the training code to see how to use multiple GPU.

wang1309 commented 1 year ago

ok, thx