← 开源

Swap your face in real-time

HTML
增长势头
+024 小时新增 Star0.0%
232
Star
23
Fork
2
贡献者
创建于 2025-01-27 · 更新于 2026-12-05 · 今日第 27614 名
主要开发者
philipp-eisenluiscape
README

FaceStream

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:

Motivation

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.

How to run this yourself

Prerequisites

To run this yourself you wil need:

  • uv
  • A modal account as well configured credentials

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 -m facestream.main

Optional: TURN Server for Cellular Networks

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:

  1. 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
  1. Comment out the following line in src/facestream/main.py:
...
secrets=[
    modal.Secret.from_name(
        "facestream",
        required_keys=[SECRET_KEY_TURN_TOKEN_ID, SECRET_KEY_TURN_API_TOKEN],
    )
]
...

Credits

  • This project was inspired by and uses the model of Deep Live Cam. Go check out their project. They have some extra features that I didn't implement here. Note that the model used in that project (and therefore also this one) is only for non-commercial use.

  • Modal made this easy to build and deploy. They are generously providing free credits to host the live demo.

排名相邻

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载