Job Queue?

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: 177 times
Been thanked: 13 times

Job Queue?

Post by MaxHunter »

I was just wondering if there's an easy way to set up a job queue, so if I'm not at my computer when an extraction or conversion is done it will queue up another job automatically, like training or another extraction. Thoughts?

Last edited by MaxHunter on Thu Aug 25, 2022 2:17 am, edited 1 time in total.
User avatar
torzdf
Posts: 2649
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 128 times
Been thanked: 623 times

Re: Job Queue?

Post by torzdf »

You can batch this kind of stuff, I do it often. Generally I will open the GUI and put in the settings I want for 1 video and then hit the Generate button to get the command line options.

I'll then open up an Anaconda prompt and enter the faceswap environment and execute a command similar to below (this is on Linux so won't work in Windows, but a bit of googling around should get you something similar that will work on Windows):

Code: Select all

for VIDEO in /media/vids/* ; \
do BASENAME=${VID##*/} ; \
FILENAME=${BASENAME%.*} ; \
FACEFOLDER="/media/faces/${FILENAME}" ;  \
python faceswap.py extract -i "$VIDEO" -o "$FACEFOLDER" ...  ; done

(the ... is where the actual extract options would go)

This will iterate through all the video files in /media/vids/ and output faces into a separate folder, named by video name in /media/faces/

My word is final

Locked