Some problems with GPU, CPU...

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
axes
Posts: 3
Joined: Wed Feb 03, 2021 3:10 pm

Some problems with GPU, CPU...

Post by axes »

Hi.
First of all, im a complete noob in informatics. I downloaded faceswap and in the instalation proces i selected the "NVIDIA GPU" version, because i have an asus laptop with a nvidia geforce 960M (2gb dedicated). All the instalation went completely right, and i saw a tutorial of how to use this program (https://www.youtube.com/watch?v=1leXXHfaOFw&t=184s) . I mean, its not that i dont know how to use the program. I did a good EXTRACTION, but when i started the "train" phase, the error: No GPU detected. Switching to CPU mode . I started some research, some of the topics i read was: (1) viewtopic.php?t=17 and (2) viewtopic.php?f=5&t=14 and some more. Finally, i managed to solve the GPU problem thanks to this thread: viewtopic.php?f=4&t=1191 (i updated faceswap and i updated the gpu drivers to 461.xx . EVERYTHING OK.
BUT.

Until i find the solution, it was 1 day of "training", and i did 11000 iteractions, and i (just to try) CONVERTED, so i got a "decent" video of faceswap. Then, when i solved the GPU problem, i decided to keep "training" without the error "No GPU detected. Switching to CPU mode ". But when i started training, the next error appeared: You do not have enought GPU. I did some research: viewtopic.php?t=1142 . I started downing the batchsize, but i had the same error with only 1 batchsize, so i changed the trainer from "original" to "lightweight", and it solved the problem, and i got 80000 iteractions in 20 hours, so i comverted a new video.
Then, i decided to make another project, so i got 2 more videos to start the "extract" phase, now with my GPU (in the 1st ones i didnt know that i had that GPU problem which i solved in the first paragraph). Surprised, i found out that another error appeared: not enought gpu for paralell, switcthing to serial (or something like that), and it didnt extract anything.

Sad, i´ve installed the CPU version, instead of GPU. QUESTIONS:
DOES THIS MEAN THAT MY GPU IS WORSE USING THIS PROGRAM THAN MY CPU? WHY CAN MY CPU TRAIN WITH BATCHSIZE 16 AND ORIGINAL AND MY GPU CANT? My cpu was slow, but i finally did 11000 iteractions in 24 hours. SHOULD I STAY WITH THE CPU VERSION OR TRY AGAIN (whit ur help and advice) THE GPU VERSION (in which i couldnt train, nor extract).

My CPU is intel core i 7 from 2016 (i think that is 6700 or something like that).
PD: Something that i realised while i was trying the GPU version is that in the task manager the GPU wasnt running at 100% (not even close, i dont know), but i dont know if it was because it couldnt even start.

THANKS

EDIT (this is now solved): The error when i try to extract with gpu version is: ERROR Got Exception on main handler:
Traceback (most recent call last):
ModuleNotFoundError: No module named 'cv2'
CRITICAL An unexpected crash has occurred. Crash report written to 'C:\Users\yoqui\faceswap\crash_report.2021.02.03.183136191159.log'. You MUST provide this file if seeking assistance. Please verify you are running the latest version of faceswap before reporting
Process exited.
CRASH report: FIXED BY UPDATING.

Last edited by axes on Wed Feb 03, 2021 5:44 pm, edited 3 times in total.

User avatar
bryanlyon
Site Admin
Posts: 634
Joined: Fri Jul 12, 2019 12:49 am
Answers: 41
Location: San Francisco
Has thanked: 3 times
Been thanked: 161 times
Contact:

Re: Some problems with GPU, CPU...

Post by bryanlyon »

Your CPU could do a larger Batch Size because your system ram is more than your GPU's VRAM. This is normal. It's better to get the additional speed from the GPU than the extra batch size from the CPU.


User avatar
axes
Posts: 3
Joined: Wed Feb 03, 2021 3:10 pm

Re: Some problems with GPU, CPU...

Post by axes »

So... should i change again to GPU version instead of cpu? and how? do i have to delete faceswap and redownload and reinstall with the nvidia gpu version?. why couldnt i extract with the gpu version?


User avatar
torzdf
Posts: 1495
Joined: Fri Jul 12, 2019 12:53 am
Answers: 127
Has thanked: 51 times
Been thanked: 287 times

Re: Some problems with GPU, CPU...

Post by torzdf »

A 2GB GPU is very unlikely to be able to train any model in Faceswap 2.

You may be able to train the Lightweight model, with all optimizations enabled and a very low batchsize of Faceswap 1.0 (https://github.com/deepfakes/faceswap/r ... tag/v1.0.0)

My word is final


User avatar
axes
Posts: 3
Joined: Wed Feb 03, 2021 3:10 pm

Re: Some problems with GPU, CPU...

Post by axes »

UPDATE:

Thx to bryan and torzd i´ve been able to start my second project with cpu. With GPU I cant EXTRACT because i get this error:

crash_report.2021.02.03.184648732341.log
(1) error when i try to extract with gpu.
(64.7 KiB) Downloaded 149 times

I guess that it is because of my low end GPU. But i dont know why it starts the proces of extracting and then the crash appears.

I can extract with CPU version. I can train with CPU (original batchsize 16) but it goes slow: 11k iteractions a day i think. I can also train GPU (lightweight) at 88k iteractions a day. I havent tried CPU lightweight.

My final question is: Whats better? a low iteraction CPU original training, or a hight iteraction GPU lightweight training?. Its important the diference between original and lightweight?

Thx for everything.


Locked