- π½ FaceFusion Face Swap HYPERSWAP (CPU)
π½ FaceFusion Face Swap HYPERSWAP (CPU)
Industry leading face manipulation platform with built-in quality analysis
β¨ Features
π Face Swapping
- Multiple Models Support:
- Hyperswap_1b_256.onnx - Best quality in most cases (recommended)
- Hyperswap_1a_256.onnx - Most stable, fewer artifacts
- Inswapper-128 - Works great with face enhancer
- High Quality PNG Output - No quality loss
- Face Selector - Choose specific faces with order/index control
- CPU-Based Processing - Unlimited usage, no GPU quota
β NEW: Face Quality Checker
Analyze source images before swapping to ensure optimal results!
Quality Checks:
- π Blur Detection - Ensures image sharpness
- π‘ Lighting Quality - Checks for proper exposure
- π Face Size - Validates face is large enough
- π Face Angle - Detects extreme poses
- ποΈ Occlusion Detection - Checks for obstructions
Benefits:
- Get instant feedback on image quality
- Receive specific recommendations
- Avoid poor quality swaps
- Save time with pre-validation
π¨ Face Enhancement
- GPEN-BFR-512 - Best quality enhancer (70-80% strength recommended)
- Multiple enhancement models available
- Optional feature for better results
π Quick Start
Option 1: Use This Space Directly
- Upload your source image (the face you want to use)
- (Optional) Click "Check Face Quality" to validate image quality
- Upload your target image (where you want to apply the face)
- Select face swap model (Hyperswap_1b_256 recommended)
- Click "Start" and wait for processing
- Download your result!
Option 2: Duplicate to Your Account (Recommended)
Why duplicate?
- β‘ No queue waiting
- π Private space for your use
- π 100% FREE on Hugging Face
- βοΈ Full control (can restart if needed)
How to duplicate:
- Click the 3 dots menu (top right corner)
- Select "Duplicate this Space"
- Choose Private visibility
- Click Create
- Enjoy unlimited private usage!
π Usage Guide
Face Quality Checker (New!)
- Upload Source Image first
- Click "Check Face Quality" button
- Review the quality report:
- β Green = Good quality
- β οΈ Yellow = Acceptable with warnings
- β Red = Poor quality, improvements needed
- Follow recommendations if needed
- Proceed with face swapping if quality is good
Example Report:
## β
Overall Quality: GOOD
### Quality Checks:
β
Blur Detection: Image sharpness is excellent (Score: 156.3)
β
Lighting Quality: Lighting is optimal (Brightness: 128.5)
β οΈ Face Size: Face is small (142px), quality may be reduced
β
Face Angle: Face angle is frontal (8.2Β°)
β
Occlusion Detection: Face is clearly visible (Score: 0.96)
Model Recommendations
π Hyperswap_1b_256.onnx (Recommended)
- Best quality in most cases
- Use WITHOUT face enhancer
- Known issue: Occasionally fails on specific faces (try 1a if this happens)
π‘οΈ Hyperswap_1a_256.onnx (Most Stable)
- Most reliable, fewer bugs
- Use WITHOUT face enhancer
- Good fallback if 1b fails
β‘ Inswapper-128
- Classic model, proven results
- Use WITH GPEN-BFR-512 enhancer at 70-80% strength
- Slower but very reliable
Face Selection
- Use Face Order to choose which face to swap
- Only the first face in the given order will be selected
- Adjust Face Index if multiple faces are detected
π‘ Tips for Best Results
Image Quality
β
Use well-lit, frontal photos
β
Ensure faces are clear and sharp
β
Avoid extreme angles or poses
β
Face size should be >200px
β
Remove obstructions (hats, hands, glasses)
Processing Tips
- First try Hyperswap_1b without enhancer
- If result has artifacts, try Hyperswap_1a
- For classic workflow, use Inswapper-128 + GPEN-BFR-512
- Check face quality BEFORE swapping to save time
- If processing takes >30 seconds, space may be frozen - restart it
βοΈ Technical Details
System
- CPU-Based Processing - No GPU required
- Python 3.12 - Latest stable version
- Gradio 5.50.0 - Modern web interface
- Based on FaceFusion v3.3.2 - Modified Edition
Models
- Multiple face swap models (ONNX format)
- Multiple face enhancer options
- All models run efficiently on CPU
Output
- High quality PNG format
- No compression artifacts
- Preserves image dimensions
π Troubleshooting
Space is frozen / taking too long (>30 sec)
- This is a known Gradio bug
- Solution: Go to Settings β Restart the Space
- Note: You need to duplicate the space to your account first
Face swap doesn't work
- Try different model (Hyperswap_1a instead of 1b)
- Check face quality first with Quality Checker
- Ensure both images have clearly visible faces
- Try without face enhancer first
Poor quality results
- Run Face Quality Checker before swapping
- Follow the recommendations provided
- Use better source images (frontal, well-lit, sharp)
- Try with face enhancer (GPEN-BFR-512 at 70-80%)
Multiple faces detected
- Use Face Order to select the correct face
- Adjust Face Index if needed
- Quality Checker will analyze the first face only
π Documentation
- Face Quality Checker Guide - Detailed quality checker documentation
- Implementation Summary - Technical implementation details
- FaceFusion Docs - Official FaceFusion documentation
π― Use Cases
- Portrait photography enhancement
- Social media content creation
- Film and video production
- Creative projects
- Research and development
β οΈ Responsible AI Usage
Please use this technology responsibly and ethically:
- β Obtain consent before swapping someone's face
- β Clearly disclose AI-generated content
- β Respect privacy and copyright
- β Follow local laws and regulations
- β Do not create misleading or harmful content
- β Do not use for fraud or deception
- β Do not violate others' rights
π License
This project is licensed under the MIT License - see LICENSE.md for details.
π Acknowledgments
- Based on FaceFusion by the FaceFusion team
- Modified Edition with additional features
- Face Quality Checker - Custom implementation
- Hosted on Hugging Face Spaces
π¬ Support & Community
Having issues or questions?
- Check the Troubleshooting section
- Read the documentation
- Duplicate the space for better performance
- Check FaceFusion's official docs
π Happy Face Swapping!
Remember:
- Use Face Quality Checker before swapping
- Duplicate space for unlimited private use
- Start with Hyperswap_1b_256 model
- Follow responsible AI practices
Enjoy creating amazing content! π½β¨