# deepbeepmeep/wan2gp architecture

> Architecture diagram of the GitHub repository deepbeepmeep/wan2gp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/deepbeepmeep/wan2gp
- Repository: https://github.com/deepbeepmeep/wan2gp

## Overview

WanGP is a browser-based generative-media application spanning video, image, audio, and speech, with local inference and API/headless use. The main user flow is to prepare a prompt and optional media, submit a generation, and manage the resulting media in the UI; the README also documents queues, reusable outputs, prompt enhancement, and input-preparation tools. Model pipelines perform inference, while shared generation-progress and media utilities support runtime work. Several model families are represented by directories because their implementation was not sampled; those connections are not asserted without evidence.

Main entry points: [`shared/deepy/web/app.js`](https://github.com/deepbeepmeep/wan2gp/blob/main/shared/deepy/web/app.js) (Web interface), [`shared/gradio/gradio_engine_patch.py`](https://github.com/deepbeepmeep/wan2gp/blob/main/shared/gradio/gradio_engine_patch.py) (Generation queue), [`models`](https://github.com/deepbeepmeep/wan2gp/tree/main/models) (Video model pipelines), [`models/TTS`](https://github.com/deepbeepmeep/wan2gp/tree/main/models/TTS) (Audio and TTS models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Creation experience"]
  node_web["Web interface<br/>[app.js]"]
  node_mediaflow["Media Flow tools<br/>[form_controller.py]"]
  node_enhance["Prompt enhancement"]
  node_queue["Generation queue"]
end

subgraph group_video["Video generation"]
  node_video_models["Video model pipelines"]
  node_wan_fusion["Wan audio-video"]
  node_h3["MiniMax H3<br/>[pipeline.py]"]
  node_ltx["LTX Video"]
end

subgraph group_image["Image generation"]
  node_image_models["Image model pipelines"]
  node_qwen_image["Qwen Image"]
  node_z_image["Z-Image"]
end

subgraph group_audio["Audio generation"]
  node_audio_models["Audio and TTS models"]
  node_ace_step["ACE-Step music"]
  node_ace_step15["ACE-Step 1.5"]
  node_tts_models["Speech synthesis<br/>[pipeline.py]"]
end

subgraph group_runtime["Shared runtime"]
  node_progress["Generation progress<br/>[phase_progress.py]"]
  node_text_cache[("Text encoder cache")]
  node_checkpoints["Checkpoint location<br/>[files_locator.py]"]
  node_loras["LoRA settings"]
end

node_user(("Creator"))

node_user -->|"creates with"| node_web
node_web -->|"queues jobs"| node_queue
node_web -->|"uses tools"| node_mediaflow
node_web -->|"enhances prompts"| node_enhance
node_queue -.->|"dispatches generation"| node_video_models
node_queue -.->|"dispatches generation"| node_image_models
node_queue -.->|"dispatches generation"| node_audio_models
node_video_models -.->|"includes"| node_wan_fusion
node_video_models -.->|"includes"| node_h3
node_video_models -.->|"includes"| node_ltx
node_image_models -.->|"includes"| node_qwen_image
node_image_models -.->|"includes"| node_z_image
node_audio_models -.->|"includes"| node_ace_step
node_audio_models -.->|"includes"| node_ace_step15
node_audio_models -.->|"includes"| node_tts_models
node_ace_step15 -->|"uses cache"| node_text_cache
node_ace_step15 -.->|"locates files"| node_checkpoints
node_ace_step -->|"uses settings"| node_loras
node_h3 -.->|"reports progress"| node_progress
node_qwen_image -.->|"reports progress"| node_progress
node_z_image -->|"uses cache"| node_text_cache

click node_web "https://github.com/deepbeepmeep/wan2gp/blob/main/shared/deepy/web/app.js"
click node_mediaflow "https://github.com/deepbeepmeep/wan2gp/blob/main/plugins/media_flow/form_controller.py"
click node_enhance "https://github.com/deepbeepmeep/wan2gp/blob/main/models/TTS/prompt_enhancers.py"
click node_queue "https://github.com/deepbeepmeep/wan2gp/blob/main/shared/gradio/gradio_engine_patch.py"
click node_video_models "https://github.com/deepbeepmeep/wan2gp/tree/main/models"
click node_wan_fusion "https://github.com/deepbeepmeep/wan2gp/blob/main/models/wan/ovi_fusion_engine.py"
click node_h3 "https://github.com/deepbeepmeep/wan2gp/blob/main/models/minimax_h3/pipeline.py"
click node_ltx "https://github.com/deepbeepmeep/wan2gp/blob/main/models/ltx_video/pipelines/pipeline_ltx_video.py"
click node_image_models "https://github.com/deepbeepmeep/wan2gp/tree/main/models"
click node_qwen_image "https://github.com/deepbeepmeep/wan2gp/blob/main/models/qwen/pipeline_qwenimage.py"
click node_z_image "https://github.com/deepbeepmeep/wan2gp/blob/main/models/z_image/pipeline_z_image.py"
click node_audio_models "https://github.com/deepbeepmeep/wan2gp/tree/main/models/TTS"
click node_ace_step "https://github.com/deepbeepmeep/wan2gp/blob/main/models/TTS/ace_step/pipeline_ace_step.py"
click node_ace_step15 "https://github.com/deepbeepmeep/wan2gp/blob/main/models/TTS/ace_step15/pipeline_ace_step15.py"
click node_tts_models "https://github.com/deepbeepmeep/wan2gp/blob/main/models/TTS/qwen3/pipeline.py"
click node_progress "https://github.com/deepbeepmeep/wan2gp/blob/main/shared/utils/phase_progress.py"
click node_text_cache "https://github.com/deepbeepmeep/wan2gp/blob/main/shared/utils/text_encoder_cache.py"
click node_checkpoints "https://github.com/deepbeepmeep/wan2gp/blob/main/shared/utils/files_locator.py"
click node_loras "https://github.com/deepbeepmeep/wan2gp/blob/main/shared/utils/loras_mutipliers.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_mediaflow,node_enhance,node_queue toneBlue
class node_video_models,node_wan_fusion,node_h3,node_ltx toneAmber
class node_image_models,node_qwen_image,node_z_image toneMint
class node_audio_models,node_ace_step,node_ace_step15,node_tts_models toneRose
class node_progress,node_text_cache,node_checkpoints,node_loras,node_user toneIndigo
```

## Components

### Creation experience

- [Web interface](https://github.com/deepbeepmeep/wan2gp/blob/main/shared/deepy/web/app.js): `shared/deepy/web/app.js`
- [Media Flow tools](https://github.com/deepbeepmeep/wan2gp/blob/main/plugins/media_flow/form_controller.py): `plugins/media_flow/form_controller.py`
- [Prompt enhancement](https://github.com/deepbeepmeep/wan2gp/blob/main/models/TTS/prompt_enhancers.py): `models/TTS/prompt_enhancers.py`
- [Generation queue](https://github.com/deepbeepmeep/wan2gp/blob/main/shared/gradio/gradio_engine_patch.py): `shared/gradio/gradio_engine_patch.py`

### Video generation

- [Video model pipelines](https://github.com/deepbeepmeep/wan2gp/tree/main/models): `models`
- [Wan audio-video](https://github.com/deepbeepmeep/wan2gp/blob/main/models/wan/ovi_fusion_engine.py): `models/wan/ovi_fusion_engine.py`
- [MiniMax H3](https://github.com/deepbeepmeep/wan2gp/blob/main/models/minimax_h3/pipeline.py): `models/minimax_h3/pipeline.py`
- [LTX Video](https://github.com/deepbeepmeep/wan2gp/blob/main/models/ltx_video/pipelines/pipeline_ltx_video.py): `models/ltx_video/pipelines/pipeline_ltx_video.py`

### Image generation

- [Image model pipelines](https://github.com/deepbeepmeep/wan2gp/tree/main/models): `models`
- [Qwen Image](https://github.com/deepbeepmeep/wan2gp/blob/main/models/qwen/pipeline_qwenimage.py): `models/qwen/pipeline_qwenimage.py`
- [Z-Image](https://github.com/deepbeepmeep/wan2gp/blob/main/models/z_image/pipeline_z_image.py): `models/z_image/pipeline_z_image.py`

### Audio generation

- [Audio and TTS models](https://github.com/deepbeepmeep/wan2gp/tree/main/models/TTS): `models/TTS`
- [ACE-Step music](https://github.com/deepbeepmeep/wan2gp/blob/main/models/TTS/ace_step/pipeline_ace_step.py): `models/TTS/ace_step/pipeline_ace_step.py`
- [ACE-Step 1.5](https://github.com/deepbeepmeep/wan2gp/blob/main/models/TTS/ace_step15/pipeline_ace_step15.py): `models/TTS/ace_step15/pipeline_ace_step15.py`
- [Speech synthesis](https://github.com/deepbeepmeep/wan2gp/blob/main/models/TTS/qwen3/pipeline.py): `models/TTS/qwen3/pipeline.py`

### Shared runtime

- [Generation progress](https://github.com/deepbeepmeep/wan2gp/blob/main/shared/utils/phase_progress.py): `shared/utils/phase_progress.py`
- [Text encoder cache](https://github.com/deepbeepmeep/wan2gp/blob/main/shared/utils/text_encoder_cache.py): `shared/utils/text_encoder_cache.py`
- [Checkpoint location](https://github.com/deepbeepmeep/wan2gp/blob/main/shared/utils/files_locator.py): `shared/utils/files_locator.py`
- [LoRA settings](https://github.com/deepbeepmeep/wan2gp/blob/main/shared/utils/loras_mutipliers.py): `shared/utils/loras_mutipliers.py`

### Other components

- **Creator**

## Connections

- Creator → Web interface: creates with (evidence: `README.md`)
- Web interface → Generation queue: queues jobs (evidence: `README.md`)
- Web interface → Media Flow tools: uses tools (evidence: `README.md`)
- Web interface → Prompt enhancement: enhances prompts (evidence: `README.md`)
- Generation queue → Video model pipelines: dispatches generation
- Generation queue → Image model pipelines: dispatches generation
- Generation queue → Audio and TTS models: dispatches generation
- Video model pipelines → Wan audio-video: includes (evidence: `models/wan/ovi_fusion_engine.py`)
- Video model pipelines → MiniMax H3: includes (evidence: `models/minimax_h3/pipeline.py`)
- Video model pipelines → LTX Video: includes (evidence: `models/ltx_video/pipelines/pipeline_ltx_video.py`)
- Image model pipelines → Qwen Image: includes (evidence: `models/qwen/pipeline_qwenimage.py`)
- Image model pipelines → Z-Image: includes (evidence: `models/z_image/pipeline_z_image.py`)
- Audio and TTS models → ACE-Step music: includes (evidence: `models/TTS/ace_step/pipeline_ace_step.py`)
- Audio and TTS models → ACE-Step 1.5: includes (evidence: `models/TTS/ace_step15/pipeline_ace_step15.py`)
- Audio and TTS models → Speech synthesis: includes
- ACE-Step 1.5 → Text encoder cache: uses cache (evidence: `models/TTS/ace_step15/pipeline_ace_step15.py`)
- ACE-Step 1.5 → Checkpoint location: locates files
- ACE-Step music → LoRA settings: uses settings (evidence: `models/TTS/ace_step/pipeline_ace_step.py`)
- MiniMax H3 → Generation progress: reports progress (evidence: `models/minimax_h3/pipeline.py`)
- Qwen Image → Generation progress: reports progress (evidence: `models/qwen/pipeline_qwenimage.py`)
- Z-Image → Text encoder cache: uses cache (evidence: `models/z_image/pipeline_z_image.py`)
