Extract is slow,and the batch-size always is 1.Althought my GPU is work and VRAM is 6GB

The Extraction process failing on you, and you aren't getting an error back with clear instructions? Tell us about it here


Forum rules

Read the FAQs and search the forum before posting a new topic.

This forum is for reporting errors with the Extraction process. If you want to get tips, or better understand the Extract process, then you should look in the Extract Discussion forum.

Please mark any answers that fixed your problems so others can find the solutions.

Locked
User avatar
Weakliy
Posts: 1
Joined: Sat Jul 23, 2022 4:01 am

Extract is slow,and the batch-size always is 1.Althought my GPU is work and VRAM is 6GB

Post by Weakliy »

Extract is slow,and the batch-size always is 1.Althought my GPU is work and VRAM is 6GB
I have setted the batch_size is Fan:24, S3Dd:12 and Mask,bisenet Fp:24
It stands to reason that batches per run cannot always be 1
Help!!

GPU:

Code: Select all

Sat Jul 23 12:07:08 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 512.64       Driver Version: 512.64       CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ... WDDM  | 00000000:01:00.0 Off |                  N/A |
| N/A   65C    P0    57W /  N/A |   4547MiB /  6144MiB |     42%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A     61580      C   ...\envs\faceswap\python.exe    N/A      |
+-----------------------------------------------------------------------------+

message:

Code: Select all

Loading...
Setting Faceswap backend to NVIDIA
07/23/2022 11:30:55 INFO     Log level set to: INFO
07/23/2022 11:30:56 INFO     Output Directory: D:\Dataset\Faceswap\data\mingli\video\video2

07/23/2022 11:30:58 INFO     Loading Detect from S3Fd plugin...
07/23/2022 11:30:58 INFO     Loading Align from Fan plugin...
07/23/2022 11:30:58 INFO     Loading Mask from Components plugin...
07/23/2022 11:30:58 INFO     Loading Mask from Extended plugin...
07/23/2022 11:30:58 INFO     Loading Mask from Bisenet_Fp plugin...
07/23/2022 11:30:58 INFO     Reset batch sizes due to available VRAM: Detect: 1, Align: 1, Mask: 1
07/23/2022 11:30:58 INFO     Starting, this may take a while...
07/23/2022 11:30:58 INFO     Initializing S3FD (Detect)...
07/23/2022 11:30:58 INFO     Initialized S3FD (Detect) with batchsize of 1
07/23/2022 11:30:58 INFO     Initializing FAN (Align)...
07/23/2022 11:31:05 INFO     Initialized FAN (Align) with batchsize of 1
07/23/2022 11:31:05 INFO     Initializing Components (Mask)...
07/23/2022 11:31:05 INFO     Initialized Components (Mask) with batchsize of 1
07/23/2022 11:31:05 INFO     Initializing Extended (Mask)...
07/23/2022 11:31:05 INFO     Initialized Extended (Mask) with batchsize of 1
07/23/2022 11:31:05 INFO     Initializing BiSeNet - Face Parsing (Mask)...
07/23/2022 11:31:07 INFO     Initialized BiSeNet - Face Parsing (Mask) with batchsize of 1
User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 622 times

Re: Extract is slow,and the batch-size always is 1.Althought my GPU is work and VRAM is 6GB

Post by torzdf »

The batch size is reset to run to enable all plugins to be able to run at once...

You can set the batch sizes to what you want in config settings, but all the models take a certain amount of VRAM to run. Some take a LOT of VRAM (S3FD takes almost 4GB on its own).

The process does some calculations for how much VRAM is required to run your selected plugins and then resets the batch sizes so that they will fit in VRAM. If we did not do this, you would instantly run out of VRAM and the process would fail with an Out of Memory error.

There are many things which impact the speed that extraction will run at. The size/encoding of the input video. The amount of faces found in a frame, the re-feed number selected, the number of masks selected etc. etc.

My word is final

Locked