π¬ Create Deepfake Videos by Swapping Faces with Fal.ai Wan 2.2 and AWS S3
β‘ 277 views Β· π¬ Content Creation & Video
Description
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 βοΈ
- π₯ Get User Input: The workflow starts when you upload a source video and a face image via the n8n Form Trigger.
- βοΈ 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.
- π 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
request_id. - β³ 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
request_id. - β
Check for Completion: An IF node checks if the job status is
COMPLETED. If not, the workflow loops back to the Wait node. - π¬ 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
- π Set Up Fal.ai Credentials: Get your API Key from Fal.ai. In n8n, go to Credentials, add a new Header Auth credential, and save your key. Connect this credential to all three
HTTP Requestnodes in the workflow. - βοΈ Configure AWS S3: Add your AWS credentials in n8n. In the two AWS S3 nodes (
Upload Video1andUpload Image1), update the Bucket Name parameter to your own S3 bucket. Ensure your bucket permissions allow for public reads. - βΆοΈ Activate and Run: Activate the workflow. Open the Form Trigger URL from the n8n editor, upload your files, and submit. The final video will be available in the execution log of the
Get Final Videonode.
Requirements
- An active Fal.ai account and API key.
- An AWS account with an S3 bucket configured for public access.
- Alternative Storage: For a personal setup, you can replace the AWS S3 nodes with Cloudinary nodes. Just ensure the output is a public URL.
π¬ Need Help or Want to Learn More?
- Join my Skool community for n8n + AI automation tutorials, live Q&A sessions, and exclusive workflows: π https://www.skool.com/n8n-ai-automation-champions
Template Author: Sandeep Patharkar
Category: Content Generation / Content Marketing
Difficulty: Intermediate
Estimated Setup Time: β±οΈ 20 minutes
π Nodes Used
HTTP Request, AWS S3, n8n Form Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File