alievk / avatarify-python

Avatars for Zoom, Skype and other video-conferencing apps.
Other
16.16k stars 3.87k forks source link

Google Colab / Remote GPU Support! #369

Open ochen1 opened 3 years ago

ochen1 commented 3 years ago

Jump to Solution Implementation

👋 Introduction

Avatarify is a great app. However, not many of us users have a GPU handy for performing the Deepfakes. I propose a solution to the issue many users are having, after the banning of ngrok by Google Colab.

⚠️ Context

It seems like Google Colab has blocked ngrok. I'm not sure how they're able to accomplish this, but I assume ngrok has a limited amount of IP addresses, which were blocked by Google Colab.

🛑 Problem Statement

Hence, functionality on ngrok will be very limited, if any. Personally, I have had trouble on 100% of attempts. The program always gets stuck on Receving from tcp://, because the port simply isn't available (blocked).

✅ Potential Solution / 💍 Proposal

Thus, I personally recommend using argotunnel, which has not been blocked yet. Argotunnel offers a free version.

⭐ Solution Implementation

The simplest way would be to use @demotomohiro's remocolab, which allows activating an ssh server on Google Colab, using Argotunnel as an ssh:// proxy to create port forwarding, which effectively fixes the NAT/tcp-tunnelling problem. Once you have an ssh connection to the server, you can use the local port forwarding feature built into ssh clients. An example of this port-forwarding command follows:

ssh -o UserKnownHostsFile=/dev/null -o VisualHostKey=yes -oProxyCommand="cloudflared access ssh --hostname %h" -L 5557:localhost:5557 -L 5558:localhost:5558 colab@your-unique-sshtcptunnel-subdomain.trycloudflare.com

🎉 The Benefits

By relying on another repository, we can provide more support for this project and maintain it for longer. We need not worry about maintaining port tunnelling solutions!

🙁 Side Effects

Unfortunately, this solution comes with some problems, of which I do not address in this issue.

🗓️ Future Targets

📝 This solution is a fix to the following issues

Let me know if this helped you with the 👍 reaction!

Also, this took way too long to publish 😆. You will not believe if I told you that I actually wrote this last year.

ItsWAWGaming commented 3 years ago

It'll still connect, it just takes forever and sometimes just stays on receiving.

eyaler commented 3 years ago

afaict ngrok is back (but argo was faster for my application)

ochen1 commented 3 years ago

afaict ngrok is back (but argo was faster for my application)

Wait... ngrok is back? :confused:

demotomohiro commented 3 years ago

afaict ngrok is back (but argo was faster for my application)

Wait... ngrok is back?

I have tested remocolab with tunnel = "ngrok" now and it worked.

ochen1 commented 3 years ago

@demotomohiro Thank you for all your hard work!

If this is the case, then I guess we can directly use the remote GPU colab notebook instead of having to use remocolab.

Samso9th commented 1 year ago

i think it may have been banned again