How vivocameraresearch/magic-tryon works
MagicTryOn generates garment-preserving virtual try-on images and videos with Wan diffusion models; its documented customization workflow prepares garment line art and person-alignment inputs before video inference. The graph includes the standard and Turbo inference branches, plus the API/UI and reward functionality visible in the tree. Some preprocessing stages are documented but their implementation files are absent from the supplied tree, so they are not represented as repository nodes; edges reflect README statements or source-index references.
Main entry points: pipeline_wan_tryon.py Try-on pipeline · predict_image_tryon_low.py Image inference · predict_video_tryon_customize.py Custom video inference · bidirectional_inference_vivid.py Turbo inference
Components 21
Try-on Inputs
- Garment image
- Person media
- Garment line art
inference/customize/AniLines/infer.py - DensePose alignment
inference/customize/detectron2/projects/DensePose
Standard Generation
- Image inference
inference/image_tryon/predict_image_tryon_low.py - Video inference
inference/video_tryon/predict_video_tryon_up.py - Custom video inference
inference/video_tryon/predict_video_tryon_customize.py - Try-on pipeline
magic_tryon/pipeline/pipeline_wan_tryon.py - Try-on transformer
magic_tryon/models/wan_transformer3d_tryon.py - Wan model components
magic_tryon/models/__init__.py - LoRA utilities
magic_tryon/utils/lora_utils.py
Turbo Generation
- Turbo inference
turbo_inference/bidirectional_inference_vivid.py - Bidirectional inference
magictryon_turbo/models/wan/bidirectional_inference.py - Trajectory wrapper
magictryon_turbo/bidirectional_trajectory_pipeline.py - Turbo model components
magictryon_turbo/models/wan/videox_fun/models/wan_image_encoder.py - Turbo inpainting
magictryon_turbo/models/wan/videox_fun/pipeline/pipeline_cogvideox_fun_inpaint.py
Product Interfaces
- API
magic_tryon/api/api.py - UI controller
magic_tryon/ui/controller.py - Reward scoring
magic_tryon/reward/reward_fn.py
Other components
- Try-on user
- Generated try-on
Connections 27
- Try-on user → Garment image: supplies
- Try-on user → Person media: supplies
- Garment image → Garment line art: extracts lines
- Person media → DensePose alignment: aligns body
- Try-on user → Image inference: requests image
- Try-on user → Video inference: requests video
- Try-on user → Custom video inference: requests custom video
- Garment line art → Custom video inference: conditions try-on
- DensePose alignment → Custom video inference: aligns try-on
- Image inference → Try-on pipeline: invokes
inference/image_tryon/predict_image_tryon_low.py - Video inference → Try-on pipeline: invokes
inference/video_tryon/predict_video_tryon_up.py - Custom video inference → Try-on pipeline: invokes
- Try-on pipeline → Try-on transformer: uses
magic_tryon/pipeline/pipeline_wan_tryon.py - Try-on pipeline → Wan model components: uses
magic_tryon/pipeline/pipeline_wan_tryon.py - Image inference → Try-on transformer: loads
inference/image_tryon/predict_image_tryon_low.py - Image inference → LoRA utilities: uses
inference/image_tryon/predict_image_tryon_low.py - Try-on pipeline → Generated try-on: generates
- Try-on user → Turbo inference: requests turbo
- Turbo inference → Bidirectional inference: constructs
turbo_inference/bidirectional_inference_vivid.py - Bidirectional inference → Turbo model components: uses
magictryon_turbo/models/wan/bidirectional_inference.py - Trajectory wrapper → Turbo model components: calls generator
- Turbo inpainting → Turbo model components: uses
magictryon_turbo/models/wan/videox_fun/pipeline/pipeline_cogvideox_fun_inpaint.py - Turbo inference → Generated try-on: writes video
- Try-on user → API: uses
- Try-on user → UI controller: uses
- UI controller → Generated try-on: produces samples
- Reward scoring → Generated try-on: scores outputs