Create Deepfake Videos by Swapping Faces with Fal.ai Wan 2.2 and AWS S3
Animate Any Face into a Video with Fal.ai Create stunning deepfake-style videos automatically by swapping a face from an image onto a source video. This workflow provides a powerful, automated pipeline to perform vide...
Template notes
Animate Any Face into a Video with Fal.ai Create stunning deepfake-style videos automatically by swapping a face from an image onto a source video.
This workflow provides a powerful, automated pipeline to perform video face-swapping using the Fal.ai API. It's designed to handle the entire asynchronous process: accepting a source video and a target face image, uploading them to cloud storage, initiating the AI job, polling for completion, and retrieving the final, rendered video.
| Services Used | Features | | :--- | :--- | | 🤖 Fal.ai | Leverages the powerful Wan 2.2 model for high-quality face animation. | | ☁️ AWS S3 | Uses enterprise-grade cloud storage for reliable public file hosting. | | 🔄 Polling Loop | Intelligently waits for the asynchronous AI job to complete before proceeding. | | 📥 n8n Form Trigger | Provides a simple UI to upload your source image and video. |
---
How It Works ⚙️
1. 📥 Get User Input: The workflow starts when you upload a source video and a face image via the n8n Form Trigger. 2. ☁️ Upload to Cloud: Both files are automatically uploaded to a specified AWS S3 bucket to generate the publicly accessible URLs required by the AI model. 3. 🚀 Start AI Job: The public URLs for the video and image are sent in an HTTP Request to the Fal.ai API, which starts the asynchronous face animation process and returns a requestid. 4. ⏳ Wait & Check: The workflow enters a polling loop. It Waits for one minute, then makes another HTTP Request to the Fal.ai status endpoint using the requestid. 5. ✅ Check for Completion: An IF node checks if the job status is COMPLETED. If not, the workflow loops back to the Wait node. 6. 🎬 Retrieve Final Video: Once the job is complete, the workflow makes a final HTTP Request to fetch the finished animated video.
---
🛠️ How to Set Up