avatarify-python
avatarify-python copied to clipboard
Google Colab / Remote GPU Support!
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 [email protected]
🎉 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.
- Remocolab needs to install some dependencies, which takes ⏰ time. This increases the amount of time the remote GPU server instance requires for startup.
- ssh port forwarding requires the availability of ports 5557 and 5558 on your client system (ie. the one running avatarify client (ie. your computer, not Colab))
🗓️ Future Targets
- [ ] implement this into the Jupyter notebook
📝 This solution is a fix to the following issues
- #240
- #284
- #301
- #315
- #368
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.
It'll still connect, it just takes forever and sometimes just stays on receiving.
afaict ngrok is back (but argo was faster for my application)
afaict ngrok is back (but argo was faster for my application)
Wait... ngrok is back? :confused:
afaict ngrok is back (but argo was faster for my application)
Wait...
ngrokis back?
I have tested remocolab with tunnel = "ngrok" now and it worked.
@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.
i think it may have been banned again