Masking with CPU

Discussions about research, Faceswapping and things that don't fit in the other categories here.


Locked
User avatar
MaxHunter
Posts: 193
Joined: Thu May 26, 2022 6:02 am
Has thanked: 176 times
Been thanked: 13 times

Masking with CPU

Post by MaxHunter »

I just did an experiment, and I have to ask, Is it possible using the CPU to mask is actually faster than the GPU?

I was testing a 4k movie because it seemed to me using the CPU last night to "re-mask" while I was playing video games was actually slightly faster than using the GPU. Is that possible? Or was it just a lucky draw? I'm using a 3080ti and a i7 8700k.

Thoughts?

User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Masking with CPU

Post by torzdf »

Which mask were you using? If landmarks based mask, then the GPU isn't used at all. The mask is generated from landmarks.

If it was an NN based mask, it would seem unlikely. However, let me know which one, because if it is as fast on CPU, then that is something I would want to look at.

My word is final

User avatar
MaxHunter
Posts: 193
Joined: Thu May 26, 2022 6:02 am
Has thanked: 176 times
Been thanked: 13 times

Re: Masking with CPU

Post by MaxHunter »

It was on Bisenet, but now I'm unsure, and I'm going to test this further before I make a fool of myself and insist I'm right. Lol. If it's not faster or the same it's definitely close (a couple minutes slower perhaps.)

User avatar
MaxHunter
Posts: 193
Joined: Thu May 26, 2022 6:02 am
Has thanked: 176 times
Been thanked: 13 times

Re: Masking with CPU

Post by MaxHunter »

Okay, I did a comparison of masking GPU vs. CPU. Unfortunately I was unable to get the exact time for CPU usage as I walked away and forgot to make a note. I can say with some accuracy the CPU was between 1 hour 10 minutes and 1 hour 20 minutes (probably around 1hr 15 min.) The GPU was 1 hour 16 minutes. This is updating 33,801 masks on a 59,192 frame 4k movie, Bisenet.

So CPU masking (on an i7 8700k, w/32g memory) is absolutely comparable to using the GPU (Evga 3080ti hybrid.). If not it's within 5 minutes at the most. (And, if it is 5 minutes extra on a CPU, that's not so bad if I want to do other stuff while waiting like gaming, etc.)

User avatar
torzdf
Posts: 2651
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 129 times
Been thanked: 622 times

Re: Masking with CPU

Post by torzdf »

Ok, good to know. Thanks. I will look at the potential for choosing to put that on cpu.

My word is final

Locked