Transform still images into lifelike animated portraits using LivePortrait and Real-ESRGAN
Features β’ Installation β’ Quick Start β’ Models β’ Requirements β’ API β’ Documentation
- Overview
- Features
- Installation
- Quick Start
- Pretrained Models
- System Requirements
- Usage Guide
- API Integration
- Performance
- Troubleshooting
- Contributing
- License
PresentaPulse is a powerful, feature-rich application for creating ultra-realistic animated portraits from still images. Built on top of LivePortrait and enhanced with Real-ESRGAN, it provides a comprehensive suite of tools for professional-quality portrait animation.
- β¨ Advanced AI Models - Powered by LivePortrait and Real-ESRGAN
- π¨ Modern UI/UX - Beautiful dark theme with glassmorphism design
- β‘ High Performance - GPU acceleration, batch processing, and optimization
- π§ Extensive Controls - Fine-tune every aspect of your animations
- π¦ Multiple Export Formats - MP4, MOV, WebM, GIF, and frame sequences
- π REST API - Programmatic access for integration
| Feature | Description |
|---|---|
| Portrait Animation | Transform still images into animated portraits |
| Multi-Face Detection | Detect and process multiple faces in group photos |
| Face Selection | Choose which faces to animate |
| Eye/Lip Retargeting | Fine-tune facial expressions |
| Relative Motion | Natural motion transfer from driving videos |
| Feature | Description |
|---|---|
| Real-ESRGAN Integration | Multiple model support (4 models) |
| Quality Presets | Low, Medium, High, Ultra quality options |
| Temporal Smoothing | Reduce jitter between frames |
| Denoising | Remove noise from videos |
| Motion Stabilization | Reduce camera shake |
| Feature | Description |
|---|---|
| Aspect Ratios | 1:1, 16:9, 9:16, 4:3, 21:9, Custom |
| Smart Cropping | Center, face-aware, directional cropping |
| Background Preservation | Padding mode maintains full image |
| Export Formats | MP4, MOV, WebM, GIF, Frame sequences |
| Custom Resolution | Export at any resolution |
| Feature | Description |
|---|---|
| GPU Memory Management | Automatic memory optimization |
| Batch Processing | Process multiple images/videos |
| Processing Queue | Thread-safe queue system |
| Multi-GPU Support | Automatic GPU selection |
| Low-Memory Mode | Optimized for weaker GPUs |
| Checkpoint/Resume | Resume interrupted processing |
| Feature | Description |
|---|---|
| Expression Intensity | Amplify or reduce expression strength |
| Blink Frequency | Control blink rate |
| Head Movement | Adjust head movement intensity |
| Gaze Direction | Control eye gaze direction |
| Expression Presets | 6 predefined expression presets |
| Feature | Description |
|---|---|
| Audio Sync | Extract and sync audio from driving video |
| Background Music | Add background music with volume control |
| Audio Normalization | Consistent audio levels |
| Loop Audio | Loop audio if shorter than video |
| Feature | Description |
|---|---|
| Real-time Preview | Preview frames during processing |
| History & Gallery | View and manage previous generations |
| Comparison View | Before/after side-by-side comparison |
| Keyboard Shortcuts | Quick actions with keyboard |
| Progress Tracking | Real-time progress with ETA |
- Python 3.8 or higher
- pip (Python package manager)
- FFmpeg (for video processing)
- CUDA-capable GPU (recommended, CPU mode available)
git clone https://github.com/LebToki/PresentaPulse.git
cd PresentaPulseWindows:
python -m venv venv
venv\Scripts\activateLinux/Mac:
python -m venv venv
source venv/bin/activateWindows (Recommended):
install.batManual:
pip install -r requirements.txtcheck_setup.bat# Run application
run.batpython app.pyOpen your browser and navigate to:
http://localhost:8080
Download all models to pretrained_weights/ directory.
# Clone LivePortrait models (requires git-lfs)
git lfs install
git clone https://huggingface.co/KwaiVGI/liveportrait pretrained_weightsModel Files:
liveportrait/landmark.onnx(~50 MB)liveportrait/base_models/appearance_feature_extractor.pth(~200 MB)liveportrait/base_models/motion_extractor.pth(~150 MB)liveportrait/base_models/spade_generator.pth(~400 MB)liveportrait/base_models/warping_module.pth(~300 MB)liveportrait/retargeting_models/stitching_retargeting_module.pth(~200 MB)
Included in LivePortrait repository:
insightface/models/buffalo_l/2d106det.onnx(~200 MB)insightface/models/buffalo_l/det_10g.onnx(~300 MB)
| Model | Size | Use Case | Download |
|---|---|---|---|
RealESRGAN_x4plus.pth |
~67 MB | General purpose 4x upscaling | Download |
RealESRGAN_x4plus_anime_6B.pth |
~17 MB | Anime/illustration optimized | Download |
realesr-animevideov3.pth |
~17 MB | Anime video optimized | Download |
RealESRNet_x4plus.pth |
~64 MB | Network-based 4x upscaling | Download |
pretrained_weights/
βββ RealESRGAN_x4plus.pth (~67 MB)
βββ RealESRGAN_x4plus_anime_6B.pth (~17 MB)
βββ realesr-animevideov3.pth (~17 MB)
βββ RealESRNet_x4plus.pth (~64 MB)
β
βββ insightface/
β βββ models/
β βββ buffalo_l/
β βββ 2d106det.onnx (~200 MB)
β βββ det_10g.onnx (~300 MB)
β
βββ liveportrait/
βββ landmark.onnx (~50 MB)
βββ base_models/
β βββ appearance_feature_extractor.pth (~200 MB)
β βββ motion_extractor.pth (~150 MB)
β βββ spade_generator.pth (~400 MB)
β βββ warping_module.pth (~300 MB)
βββ retargeting_models/
βββ stitching_retargeting_module.pth (~200 MB)
Total: ~2.5 GB
| Component | Specification |
|---|---|
| OS | Windows 10/11, Linux (Ubuntu 20.04+) |
| CPU | Intel i5 / AMD Ryzen 5 (4+ cores) |
| RAM | 8 GB |
| GPU | NVIDIA GTX 1060 (6GB VRAM) or equivalent |
| Storage | 10 GB free space (models + outputs) |
| Python | 3.8+ |
| Component | Specification |
|---|---|
| OS | Windows 11 / Linux (Ubuntu 22.04+) |
| CPU | Intel i7 / AMD Ryzen 7 (8+ cores) |
| RAM | 16 GB+ |
| GPU | NVIDIA RTX 3060 (12GB VRAM) or better |
| Storage | 20 GB+ SSD (faster processing) |
| Python | 3.10+ |
| Component | Specification |
|---|---|
| GPU | NVIDIA RTX 3070/3080/3090 (8GB+ VRAM) |
| RAM | 32 GB |
| Storage | NVMe SSD |
| CUDA | 11.8+ |
| cuDNN | 8.6+ |
| GPU Model | Idle | Processing | Peak |
|---|---|---|---|
| GTX 1060 (6GB) | 20W | 120W | 150W |
| RTX 3060 (12GB) | 30W | 170W | 200W |
| RTX 3070 (8GB) | 25W | 220W | 250W |
| RTX 3080 (10GB) | 30W | 320W | 350W |
| RTX 3090 (24GB) | 50W | 350W | 450W |
Processing Times:
- GTX 1060: ~2-5 minutes per animation
- RTX 3060: ~30-60 seconds per animation
- RTX 3070+: ~15-30 seconds per animation
- Upload Image - Select or upload a portrait image
- Upload Video - Choose a driving video with facial expressions
- Configure Settings (optional):
- Enable/disable relative motion
- Set crop and paste-back options
- Adjust smoothing and denoising
- Click "Generate Animation"
- Download Result - Get your animated portrait!
- Upload image with multiple faces
- Click "Detect Faces" button
- Preview shows detected faces with bounding boxes
- Select which faces to animate (or leave empty for all)
- Generate animation - each face processed individually
- Open "Animation Settings" accordion
- Select aspect ratio (16:9, 9:16, custom, etc.)
- Choose crop mode (center, face-aware, etc.)
- Enable "Preserve Background" for padding mode
- Generate with your preferred format
- Go to "Batch Processing" tab
- Upload multiple images and videos
- Configure batch settings
- Click "Start Batch Processing"
- Download individual files or ZIP archive
Ctrl + Enter- Generate AnimationCtrl + R- Refresh History GalleryCtrl + K- Toggle Shortcuts PanelEsc- Close Modals/Accordions
PresentaPulse includes a REST API server for programmatic access.
python api_server.pyThe API server runs on http://localhost:5000 by default.
GET /api/healthResponse:
{
"status": "healthy",
"timestamp": "2024-01-01T00:00:00",
"version": "1.0.0"
}POST /api/v1/generate
Headers:
X-API-Key: your_api_key
Content-Type: application/json
{
"image_path": "path/to/image.jpg",
"video_path": "path/to/video.mp4",
"parameters": {
"relative_motion": true,
"do_crop": true,
"remap": true
}
}Response:
{
"job_id": "abc123",
"status": "queued",
"estimated_time": 60
}GET /api/v1/job/{job_id}
Headers:
X-API-Key: your_api_keyPOST /api/v1/keys
Content-Type: application/json
{
"name": "My Application",
"rate_limit": 100
}POST /api/v1/webhook
Headers:
X-API-Key: your_api_key
Content-Type: application/json
{
"url": "https://example.com/webhook",
"events": ["job.completed", "job.failed"]
}- Default: 1000 requests per hour per IP
- Per-endpoint limits can be configured
- API key-based rate limiting available
API keys are required for most endpoints. Include the API key in headers:
X-API-Key: your_api_key
Or as a query parameter:
?api_key=your_api_key
- Automatic cache clearing
- Memory usage monitoring
- Low-memory mode for weaker GPUs
Set environment variable:
export LOW_MEMORY_MODE=trueOr toggle in UI: Performance & System Info β Low Memory Mode
- Process multiple items in queue
- Automatic resource management
- Progress tracking per item
- Automatic GPU detection
- Load balancing
- Device selection in UI
Problem: Import "src.utils.helper" could not be resolved
Solution: Clone LivePortrait repository and copy src/ directory:
git clone https://github.com/KwaiVGI/LivePortrait.git
cp -r LivePortrait/src PresentaPulse/srcSolution: Enable low-memory mode or reduce batch size
Solution: Install FFmpeg and ensure it's in PATH:
- Windows: Download from ffmpeg.org
- Linux:
sudo apt-get install ffmpeg - Mac:
brew install ffmpeg
Solution: Download models to pretrained_weights/ directory (see Pretrained Models)
- Check SETUP.md for detailed setup instructions
- Review ENHANCEMENTS.md for feature documentation
- Open an issue on GitHub for bugs or feature requests
- SETUP.md - Detailed setup instructions
- ENHANCEMENTS.md - Complete feature roadmap
- CHANGELOG.md - Version history
- ENHANCEMENTS_SUMMARY.md - Quick feature reference
- FEATURES_COMPLETE.md - Completed features list
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow PEP 8 Python style guide
- Add docstrings to functions and classes
- Include type hints where possible
- Write clear commit messages
Special thanks to the creators of:
- LivePortrait - Core animation technology
- Real-ESRGAN - Video enhancement
- InsightFace - Face detection
- Gradio - Web interface framework
This project is licensed under the MIT License - see the LICENSE file for details.
Tarek Tarabichi
2TInteractive
If you find this project useful, please consider:
- β Starring the repository
- π Reporting bugs
- π‘ Suggesting new features
- π’ Sharing with others
