Page 1 of 1

Training Using Google Colab

Posted: Tue Jun 23, 2020 8:47 pm
by RakaMaru
Hello Faceswap Community.

I have spent weeks here learning and using tips to get good results in Faceswap. Thank you for this great community.

Lately I've been struggling with training times, so I decided to try to use the Google Colab, and the results are very good. Training for the same results, using the Colab has cut my training from weeks to just days.

In gratitude, I thought I would share my notebook which I'm currently using. ... lab_Master

Thank you

Re: Training Using Google Colab

Posted: Wed Jun 24, 2020 8:26 pm
by RakaMaru
To keep the Colab from timing out, use this.

Google Colab Keep-Alive Script
function ClickConnect(){

In Chrome (Ctrl-Shift-i), then paste into the console.

Re: Training Using Google Colab

Posted: Tue Jun 30, 2020 10:23 am
by Bolos

And before i get myself ambarrassed, i'd like to thank you, and everyone involved in this deepfake madness. :)

I've been trying to use your googlecolab workflow since i got to make faceswap work on my computer, but it's my working machine and it can't do both ^^. (by the way i'm on a mac, the trashcan one with a pair of amd D700 6gb)

So i think i got everything working from your google colab sheet (i pressed the make a copy, hope i don't messup up anything this way) but the last section "Run training" ( 06/30/2020 00:02:39 ERROR The Timelapse path '/content/face_a' does not contain any valid images).

I'm sorry to bother, since i'm a newborn noob, and despites my good will to try to read what is requested and/or hapening, i have to admit, i don't get much out of it.

I did make the same path in my google drive: My drive/colab_files/faceswap/faces --- with two zip files named
and (the names of the jpg files inside are differend tho img_21656.jpg and Poutin.13565.jpg)
They have been extracted with faceswap and are 256x256. (it's the same set i've worked fine on my desktop)

(EDIT) I read somewhere in the code that the image size is set on 128, so i changed mines to 128. But still having the same problem with : "The Timelapse path '/content/face_a' does not contain any valid images"

I did one thing i'm not confident at all just before this step, when the collab script asked to choose between
1 - AMD 2 - CPU 3 - NVIDA As i said i'm running a trashcan so i'm stock with amd but i still choosed nvidia thinking it's not my computer running... I made a mistake right?

If you had time to maybe kindly tell me where to go find some more informations on what have gone wrong at that step?
Meanwhile i'll go read more on the googlecollab notice ^^'

Thanks from advance.


Re: Training Using Google Colab

Posted: Tue Jun 30, 2020 4:10 pm
by bryanlyon
It wont work with zipped images. The folder has to have the actual images extracted. That said, timelapse is an optional mode and you can just leave that blank and run without timelapse if you want.

Re: Training Using Google Colab

Posted: Tue Jun 30, 2020 4:58 pm
by Bolos
Thank you for the answear. I might just pass for even dumber than i actually am, but i thought that in the collab sheet it is mentioned to put all images of face_a with the correct alignments.fsa fil and zip it... And of course same for face_b. I followed the nicely done collab sheetmentionned in the first post of RakaMaru.

There even is an action for unzipping the folders... But i might get something on the naming wrong. In the unzziping results there is this as a result on the section "Download training data": (it did that for all the images, that's just the last lines)

inflating: face_b/__MACOSX/face_b/._face_b_00890.jpg
inflating: face_b/face_b/face_b_03341.jpg
inflating: face_b/__MACOSX/face_b/._face_b_03341.jpg

So i'm actually renaming the files at start so the name is only numbers... Probably loosing my time ^^' i mean learning :)

As for the timelaps, if i un derstood correctly, it's a sort of preview in or for g colab? The things is i didn't change anything on the code, but try hard to make my project fit it... And understand a few things along :)

Again thanks for your answear, feel a bit bad as if i was waisting poeple's time ^^