How soul-ailab/soulx-flashhead works
SoulX-FlashHead is an inference application for generating talking-head video from a reference image and audio, with both regular and streaming Gradio interfaces and Pro/Lite model modes. The documented workflow is audio/image input → inference setup and preprocessing → audio-conditioned video generation → decoded frames. The graph includes the sampled model and VAE layers plus README-documented interfaces. Some internal generation and streaming details were not sampled, so those links are omitted rather than inferred.
Main entry points: flash_head_pipeline.py Generation pipeline · inference.py Inference API · gradio_app.py Gradio demo · gradio_app_streaming.py Streaming demo
Components 18
User interfaces
- Gradio demo
gradio_app.py - Streaming demo
gradio_app_streaming.py - Inference scripts
generate_video.py
Inference orchestration
- Inference API
flash_head/inference.py - Generation pipeline
flash_head/src/pipeline/flash_head_pipeline.py - Inference parameters
flash_head/configs/infer_params.yaml
Input conditioning
- Audio preprocessing
flash_head/src/pipeline/flash_head_pipeline.py - Wav2Vec2 encoder
flash_head/audio_analysis/wav2vec2.py - Face cropping
flash_head/utils/facecrop.py - CPU face detection
flash_head/utils/cpu_face_handler.py
Generation models
- FlashHead model
flash_head/src/modules/flash_head_model.py
Video encoding
- Wan video VAE
flash_head/wan/modules/vae.py - LTX VAE adapter
flash_head/ltx_video/ltx_vae.py - Causal video autoencoder
flash_head/ltx_video/models/autoencoders/causal_video_autoencoder.py - Video autoencoder
flash_head/ltx_video/models/autoencoders/video_autoencoder.py - VAE core
flash_head/ltx_video/models/autoencoders/vae.py
Other components
- User
- Generated frames
Connections 23
- User → Gradio demo: provides inputs
README.md - User → Streaming demo: provides inputs
README.md - User → Inference scripts: provides inputs
README.md - Gradio demo → Inference API: calls inference
gradio_app.py - Streaming demo → Inference API: calls inference
gradio_app_streaming.py - Inference scripts → Inference API: calls inference
generate_video.py - Inference API → Inference parameters: reads parameters
flash_head/inference.py - Inference API → Generation pipeline: creates pipeline
flash_head/inference.py - Inference API → Generation pipeline: prepares inputs
flash_head/inference.py - Inference API → Generation pipeline: runs generation
flash_head/inference.py - Generation pipeline → Wav2Vec2 encoder: loads encoder
flash_head/src/pipeline/flash_head_pipeline.py - Generation pipeline → Audio preprocessing: preprocesses audio
flash_head/src/pipeline/flash_head_pipeline.py - Audio preprocessing → Wav2Vec2 encoder: extracts features
flash_head/src/pipeline/flash_head_pipeline.py - Generation pipeline → Face cropping: crops reference
flash_head/src/pipeline/flash_head_pipeline.py - Face cropping → CPU face detection: uses detector
flash_head/utils/facecrop.py - Generation pipeline → FlashHead model: runs model
flash_head/src/pipeline/flash_head_pipeline.py - Generation pipeline → Wan video VAE: loads VAE
flash_head/src/pipeline/flash_head_pipeline.py - Generation pipeline → LTX VAE adapter: loads LTX VAE
flash_head/src/pipeline/flash_head_pipeline.py - LTX VAE adapter → Causal video autoencoder: encodes and decodes
flash_head/ltx_video/ltx_vae.py - Causal video autoencoder → Video autoencoder: uses autoencoder
- Video autoencoder → VAE core: uses VAE core
flash_head/ltx_video/models/autoencoders/video_autoencoder.py - Generation pipeline → Generated frames: returns frames
- Inference API → Generated frames: converts output
flash_head/inference.py