How evgenyalex21/faceswap-webapp works
Local Face Swap is an offline Gradio application: users select source and target faces, process a photo or video, and receive a saved result; video processing can retain its audio. The UI also exposes prompt-based editing, image-to-video animation, and mask-based inpainting. Shared infrastructure handles GPU selection, VRAM pressure, prompt translation, and media I/O. The graph reflects the shown calls and documented capabilities; some internal wiring, especially video audio handling, is not visible in the excerpts.
Main entry points: main.py Gradio UI · swapper.py Video swapping · utils.py Media utilities · editor.py Prompt editor
Components 13
Application interface
- Gradio UI
app/main.py
Face swapping
- Face selection
app/swapper.py - Photo swapping
app/swapper.py - Video swapping
app/swapper.py
AI image tools
- Prompt editor
app/editor.py - Photo animation
app/animator.py - Mask inpainting
app/inpaint.py - Prompt translation
app/translate.py
Media and outputs
- Media utilities
app/utils.py - Local results
app/utils.py
Runtime support
- CUDA detection
app/gpu_utils.py - VRAM manager
app/vram.py
Other components
- Local user
Connections 20
- Local user → Gradio UI: uses
README.md - Gradio UI → Face selection: requests scans
README.md - Gradio UI → Photo swapping: requests photo swap
app/main.py - Gradio UI → Video swapping: requests video swap
app/main.py - Gradio UI → Prompt editor: requests edits
app/main.py - Gradio UI → Photo animation: requests animation
README.md - Gradio UI → Mask inpainting: requests inpainting
app/main.py - Photo swapping → CUDA detection: selects providers
app/swapper.py - Photo swapping → Media utilities: uses media I/O
app/swapper.py - Video swapping → CUDA detection: selects providers
app/swapper.py - Video swapping → Media utilities: uses media I/O
app/swapper.py - Video swapping → Local results: saves video
app/swapper.py - Prompt editor → Prompt translation: translates prompts
app/editor.py - Photo animation → Prompt translation: translates prompts
app/animator.py - Prompt editor → VRAM manager: manages memory
app/editor.py - Photo animation → VRAM manager: manages memory
app/animator.py - Mask inpainting → Media utilities: writes result
app/inpaint.py - Prompt translation → Media utilities: uses model paths
app/translate.py - VRAM manager → Photo swapping: unloads models
app/vram.py - Gradio UI → CUDA detection: initializes diagnostics
app/main.py