This is a web app that let’s you swap your face in real-time without having a powerful
machine. You can try it out live here.
See the gif below for a demo:
I discovered the Deep Live Cam project and tried to run it on my M1 MacBook, but only got 0.5 FPS. So I wanted to explore how fast and at what latency you could get this to run on a remote server via WebRTC.
To run this yourself you wil need:
Then you can run the following command to start the server:
uv run modal serve facestream.main
Or this command to deploy it:
uv run modal deploy facestream.main
On most cellular networks you need a TURN server for WebRTC to work. You can create a TURN app on Cloudflare. To use those with this app you need to:
- Create a secret called
facestream
in modal with the following values:
TURN_TOKEN_ID=your-turn-token-id
TURN_API_TOKEN=your-turn-api-token
- Comment out the following line in src/facestream/main.py:
...
secret