[Guide] Setting up Faceswap-gce-os on Gcloud.

Want to use Faceswap in The Cloud? This is not directly supported by the Devs, but you may find community support here


Forum rules

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

NB: The Devs do not directly support using Cloud based services, but you can find community support here.

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

User avatar
pfakanator
Posts: 30
Joined: Thu Jul 18, 2019 5:02 pm
Answers: 1
Has thanked: 3 times
Been thanked: 12 times

[Guide] Setting up Faceswap-gce-os on Gcloud.

Post by pfakanator »

Gcloud Custom Faceswap Image

Image

Introduction

Google offers a $300 dollar credit when you sign up for gcloud, their cloud computing suite of product offerings. Their cloud compute offering allows you to run virtual machines, in the cloud, that can leverage data center hardware across the globe. In short, you can use big GPUs for free. This guide will show you how to setup an account, upload a pre-configured Faceswap operating system image and get started using Faceswap on cloud compute GPUs.

Instructions:

  1. First, go to https://cloud.google.com and setup an account. The process should be self explanatory. When you've done it, you should see this welcome image:

Image

  1. Select Compute Engine > VM instances. This will enable Compute Engine for your account.

Image

Image

  1. Once the Compute Engine is ready you need to ask for resources to be available to your account. This is handled by quota requests. Type "quota" in the search field at the top of the page and select "All Quotas".

Image

Selecting Quotas:

The resources needed to run Compute Engine eg. GPUs are not available to you unless you request them. You will need to select type and region to get them. Note, not all resources are available in all regions. You can find a list of available GPUs per regioin here: https://cloud.google.com/compute/docs/resources. You'll need to pare down the available resources you need. The process is as follows:

  1. Under metrics, select none then type GPU into the search field. You will NEED to select "GPUs All Regions". Then you will select the GPU type you wish to use.

Image

  1. Under location, choose the data center location you wish to use including “Global”. (Note: not all resources are available in all regions as you will see in a moment).

Image

  1. In order to use the newly filtered resources you will need to upgrade your account. Select the upgrade account button in the upper right hand corner and confirm. You are advised to go to budget and create one that will send you notifications as you use your credits. That way, you know when you're creeping up to $300 and avoid any additional fees, if any.

Image

  1. Now you can select "Edit Quotas", fill out your info on the right hand side of the page and select next.

Image

  1. Confirm your quota submission, provide a reason and submit request.

Image

You should now receive an email confirming your request for a quota increase and a second saying your evaluation is underway. The approval process can take anywhere between 2 hours and 2 days.

When your request has been confirmed you will receive an email that looks like the following (but we're not going to sit around and wait for it, there more to do in the interim):

Image

Downloading the Image and Uploading to a Bucket

The image, faceswap-gce-os.tar-v2.gz and be downloaded at the following url:
https://drive.google.com/file/d/1Ulb_F1 ... sp=sharing

Proceed through the following 2 confirmations.

Image Image



Creating A Bucket:


You'll need a place to store your freshly downloaded image on gcloud for VM creation later on. To do this you need to create a storage bucket. The process is as follows:

  1. In the left hand side panel, select Storage -> Browser.

Image

  1. Create a bucket. Create a unique name and select default options.

Image

  1. Upload the os image to the bucket. Simply drag and drop.

Image

Yay! you're now staged to create a VM.

Creating the Virtual Machine

This is broken down into 2 main stages. The creating a gce machine image and creating a VM from the newly created machine image. The image you uploaded to the bucket is a compressed image, but it needs to be imported to Compute Engine.

Stage 1

Creating a machine image from the file uploaded to your bucket.

  1. Go to Compute Engine -> Images -> [+] CREATE IMAGE

Image

  1. Choose a name and select Cloud Storage file as your source.

Image

  1. Select the source file in your bucket.

Image

  1. Choose a region that corresponds with the quota resources you were approved for and select create.

Image

This process should take roughly 15 minutes and when it's successful, you'll see a green check mark next to the image.

Image

Stage 2
(before continuing you need to have received your quota approval)

Creating the virtual machine.

  1. Go to Compute Engine -> VM instances -> and select Create.

Image

  1. Fill in the preferred name of your VM and choose the region and zone from the provisioned
    resources you made your quota request from. Under machine configuration select the general purpose N1 series n1-standard-4. This will give you a machine with 4 virtual CPUs and 15 GB of memory.

Image

  1. Ok.. GPU time. Pess the “CPU Platform and GPU” drop down.

Image

  1. Select the provisioned GPU/s you made the quota request for.

Image

  1. Next, you’ll want to go to the boot disk section and choose change. In the fly out panel choose the custom images tab. Choose your project, previously created image and boot disk type (don’t bother with an SSD disk. They incur additional cost for performance that is unnecessary for Faceswap).

Image

  1. Ensure the settings for API access is set to allow all the cloud APIs and the firewall allows HTTP and HTTPS traffic. Review the settings and press create.

Image

Watch while you VM spins up. ;)

Image

Aaaand. It’s up with an external IP that you will be connecting to. This IP is ephemeral and can change between reboots

Image

Connecting to the VM GUI

The VM comes loaded with a low latency remote desktop solution called X2go. To connect to it you will need to download a client that supports X2go. We’ll focus on the Windows client here.
Proceed to X2go client download, retrieve the Windows client, install it and launch it.

https://wiki.x2go.org/doku.php

Setting up X2go session

  1. At launch, you will be presented with a session configuration window. Give it a friendly session name. Enter the host ip, the user “deepfaker” and select session type XFCE.

Image

  1. In the Input/Output tab set screen size to “Maximum Available” (you can scale this later) and uncheck set display DPI.

Image

  1. Finally, in the Media tab, uncheck Enable sound support and Client side printing support.

Image

Connect and Install Faceswap

  1. Connect with username “deepfaker” and password “punishthemonkeys”, then accept the encryption key.

Image

Image

Welcome to your Faceswap cloud instance! Time to install Faceswap.

  1. Click Home on the desktop, drill down to your /home/deepfaker/Documents directory, right click and choose “Open Terminal Here”

Image

  1. Type “./fsinstaller.sh” and hit enter. This will begin the installation of Faceswap. Follow the prompts, select defaults and type yes to proceed.

Image

Ok, all finished! Upload your data from your cloud storage provider of choice (gdrive is fast as it’s already on Google’s network infrastructure). Launch Faceswap from the shortcut on the desktop and start deepfaking.

Image

Anytime you want to disconnect from the session and keep training, simply close the remote session by pressing the X in the upper right hand corner of the session window. Training will continue while you are disconnected. If you wish to shutdown the VM while not in use, in order to prevent the use of unnecessary use of credits, click the Faceswap icon on the taskbar, go to the power icon in the upper right hand corner and select shutdown. You’ll be prompted for your password and the VM will spin down. You can do plenty of training with $300 in credit.

Happy Deepfaking.


Tags:
User avatar
zzz
Posts: 3
Joined: Sat Feb 22, 2020 4:10 pm
Has thanked: 3 times
Been thanked: 5 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by zzz »

Thanks, saved me hours of more work trying to get it to run.

User avatar
chicobello
Posts: 2
Joined: Thu Sep 10, 2020 9:38 am

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by chicobello »

Hi!

Thanks for the guide!

I can not create the image, when i create it nothing happens, any clue why?

User avatar
pfakanator
Posts: 30
Joined: Thu Jul 18, 2019 5:02 pm
Answers: 1
Has thanked: 3 times
Been thanked: 12 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by pfakanator »

Refresh the image list (not the entire browser page)

User avatar
FuorissimoX
Posts: 56
Joined: Mon Sep 21, 2020 6:49 am
Location: Italy
Has thanked: 10 times
Been thanked: 2 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by FuorissimoX »

After selecting QUOTE> GPU the list appears but there is no selectable location. Unfortunately you cannot upload screenshots here in the forum

User avatar
pfakanator
Posts: 30
Joined: Thu Jul 18, 2019 5:02 pm
Answers: 1
Has thanked: 3 times
Been thanked: 12 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by pfakanator »

Google has revised their quota request system.

Once you've added gpu to the filter table, select GPUs all regions and hit EDIT QUOTAS. Enter your contact info and request 1 allotment.

You'll do the same for the particular GPU you wish to use. This time, however, on the right hand side you'll see a list of locations (you can expand the list by clicking "SEE xx MORE LOCATIONS"). Select a location that contains your GPU of choice (follow the link in the guide for availability by location). Again, EDIT QUOTAS at the top, enter contact details and request 1.

User avatar
FuorissimoX
Posts: 56
Joined: Mon Sep 21, 2020 6:49 am
Location: Italy
Has thanked: 10 times
Been thanked: 2 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by FuorissimoX »

I can't select nothing

Image Image Image

User avatar
pfakanator
Posts: 30
Joined: Thu Jul 18, 2019 5:02 pm
Answers: 1
Has thanked: 3 times
Been thanked: 12 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by pfakanator »

Are you using the checkbox?

User avatar
FuorissimoX
Posts: 56
Joined: Mon Sep 21, 2020 6:49 am
Location: Italy
Has thanked: 10 times
Been thanked: 2 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by FuorissimoX »

No option is checkable :?: :?: :?:

User avatar
pfakanator
Posts: 30
Joined: Thu Jul 18, 2019 5:02 pm
Answers: 1
Has thanked: 3 times
Been thanked: 12 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by pfakanator »

try "TUTTE LE QUOTE"

User avatar
FuorissimoX
Posts: 56
Joined: Mon Sep 21, 2020 6:49 am
Location: Italy
Has thanked: 10 times
Been thanked: 2 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by FuorissimoX »

Already do it, the results is this:

https://ibb.co/Y3pZTSC

User avatar
pfakanator
Posts: 30
Joined: Thu Jul 18, 2019 5:02 pm
Answers: 1
Has thanked: 3 times
Been thanked: 12 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by pfakanator »

Image

User avatar
FuorissimoX
Posts: 56
Joined: Mon Sep 21, 2020 6:49 am
Location: Italy
Has thanked: 10 times
Been thanked: 2 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by FuorissimoX »

That checkbox is not clickable
:shock:

User avatar
pfakanator
Posts: 30
Joined: Thu Jul 18, 2019 5:02 pm
Answers: 1
Has thanked: 3 times
Been thanked: 12 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by pfakanator »

Image

User avatar
FuorissimoX
Posts: 56
Joined: Mon Sep 21, 2020 6:49 am
Location: Italy
Has thanked: 10 times
Been thanked: 2 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by FuorissimoX »

That checkbox is not clickable.. none

User avatar
pfakanator
Posts: 30
Joined: Thu Jul 18, 2019 5:02 pm
Answers: 1
Has thanked: 3 times
Been thanked: 12 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by pfakanator »

I don't know what's going on. I cannot replicate your issue.

User avatar
FuorissimoX
Posts: 56
Joined: Mon Sep 21, 2020 6:49 am
Location: Italy
Has thanked: 10 times
Been thanked: 2 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by FuorissimoX »

take a look

User avatar
pfakanator
Posts: 30
Joined: Thu Jul 18, 2019 5:02 pm
Answers: 1
Has thanked: 3 times
Been thanked: 12 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by pfakanator »

Ok, that's REALLY weird.... Have you enabled billing?
https://cloud.google.com/billing/docs/h ... fy-project

User avatar
FuorissimoX
Posts: 56
Joined: Mon Sep 21, 2020 6:49 am
Location: Italy
Has thanked: 10 times
Been thanked: 2 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by FuorissimoX »

Yes, its the first thing i have do.

I have write my CC number and also my Paypal.
I wrong something but i really dont know, what :?:

User avatar
FuorissimoX
Posts: 56
Joined: Mon Sep 21, 2020 6:49 am
Location: Italy
Has thanked: 10 times
Been thanked: 2 times

Re: [Guide] Setting up Faceswap-gce-os on Gcloud.

Post by FuorissimoX »

I finally solved it, I had to click on UPGRADE account but I didn't have the link anywhere. It appeared to me a while ago. Really badly managed.

Image

Post Reply