# vast-ai-research/edenlive architecture

> Architecture diagram of the GitHub repository vast-ai-research/edenlive, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vast-ai-research/edenlive
- Repository: https://github.com/vast-ai-research/edenlive

## Overview

EdenLive separates world-state evolution from neural rendering: an interactive program or proxy recording supplies frames, while a prompt and target first frame guide video generation. The repository provides offline inference, real-time streaming, camera/game applications, and a prompt-to-game workbench. The graph combines sampled runtime contracts and pipeline references with the README’s product-level descriptions; unsampled areas are represented only where the README supports their role.

Main entry points: [`realtime/flashdreams/flashdreams/api_v2/session.py`](https://github.com/vast-ai-research/edenlive/blob/main/realtime/flashdreams/flashdreams/api_v2/session.py) (Session runtime), [`edenlive/scripts/infer.py`](https://github.com/vast-ai-research/edenlive/blob/main/edenlive/scripts/infer.py) (Offline inference entry), [`edenlive/inference/engine.py`](https://github.com/vast-ai-research/edenlive/blob/main/edenlive/inference/engine.py) (Inference engine), [`realtime/integrations_v2/eden/apps/game2v/application.py`](https://github.com/vast-ai-research/edenlive/blob/main/realtime/integrations_v2/eden/apps/game2v/application.py) (Game-to-video app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_offline["Offline inference"]
  node_offline_cli["Offline inference entry<br/>[infer.py]"]
  node_engine["Inference engine<br/>[engine.py]"]
  node_strategy["Sampling strategies"]
end

subgraph group_model["Model runtime"]
  node_model_adapter["Model adapter"]
  node_wan_pipeline["Wan generation pipeline<br/>[pipeline.py]"]
  node_encoders["Text and image encoders"]
end

subgraph group_stream["Realtime streaming"]
  node_session_runtime["Session runtime<br/>[session.py]"]
  node_session_contract["Session description<br/>[session_desc.py]"]
  node_presentation["Frame presentation"]
  node_postprocess["Video postprocessing"]
  node_webrtc["WebRTC output"]
end

subgraph group_apps["Interactive applications"]
  node_game_input["Game reference input"]
  node_game2v["Game-to-video app<br/>[application.py]"]
  node_cam2v["Camera-to-video app<br/>[application.py]"]
  node_game_host["Game demo host<br/>[demo-runtime.js]"]
end

subgraph group_workbench["Game workbench"]
  node_workbench["Prompt-to-game workbench"]
  node_first_frame["First-frame renderer<br/>[flux_worker.py]"]
end

node_user(("User"))
node_proxy["Reference video"]
node_prompt["Prompt and anchor"]
node_browser(("Browser client"))

node_user -->|"starts inference"| node_offline_cli
node_proxy -->|"provides frames"| node_offline_cli
node_prompt -->|"guides generation"| node_offline_cli
node_offline_cli -.->|"invokes"| node_engine
node_engine -->|"dispatches"| node_strategy
node_engine -->|"generates with"| node_model_adapter
node_wan_pipeline -->|"uses"| node_encoders
node_user -->|"plays"| node_game_host
node_game_host -->|"runs"| node_game_input
node_game_input -->|"supplies frames"| node_game2v
node_user -.->|"provides camera input"| node_cam2v
node_game2v -->|"implements application"| node_session_runtime
node_cam2v -->|"implements application"| node_session_runtime
node_session_runtime -->|"configures session"| node_session_contract
node_session_runtime -->|"buffers frames"| node_presentation
node_game2v -->|"builds on"| node_wan_pipeline
node_session_runtime -.->|"supports processing"| node_postprocess
node_presentation -.->|"streams frames"| node_webrtc
node_webrtc -->|"delivers video"| node_browser
node_user -->|"describes game"| node_workbench
node_workbench -->|"renders anchor"| node_first_frame
node_workbench -->|"creates playable game"| node_game_host

click node_offline_cli "https://github.com/vast-ai-research/edenlive/blob/main/edenlive/scripts/infer.py"
click node_engine "https://github.com/vast-ai-research/edenlive/blob/main/edenlive/inference/engine.py"
click node_strategy "https://github.com/vast-ai-research/edenlive/tree/main/edenlive/inference/strategies"
click node_model_adapter "https://github.com/vast-ai-research/edenlive/tree/main/edenlive/models"
click node_wan_pipeline "https://github.com/vast-ai-research/edenlive/blob/main/realtime/flashdreams/flashdreams/recipes/wan/pipeline.py"
click node_encoders "https://github.com/vast-ai-research/edenlive/tree/main/realtime/flashdreams/flashdreams/infra/encoder"
click node_session_runtime "https://github.com/vast-ai-research/edenlive/blob/main/realtime/flashdreams/flashdreams/api_v2/session.py"
click node_session_contract "https://github.com/vast-ai-research/edenlive/blob/main/realtime/flashdreams/flashdreams/runtime_v2/session_desc.py"
click node_presentation "https://github.com/vast-ai-research/edenlive/blob/main/realtime/flashdreams/flashdreams/runtime_v2/presentation_manager.py"
click node_postprocess "https://github.com/vast-ai-research/edenlive/tree/main/realtime/flashdreams/flashdreams/infra/postprocess"
click node_webrtc "https://github.com/vast-ai-research/edenlive/tree/main/realtime/flashdreams/flashdreams/runtime_v2/serving"
click node_game_input "https://github.com/vast-ai-research/edenlive/tree/main/realtime/games"
click node_game2v "https://github.com/vast-ai-research/edenlive/blob/main/realtime/integrations_v2/eden/apps/game2v/application.py"
click node_cam2v "https://github.com/vast-ai-research/edenlive/blob/main/realtime/apps/cam2v/cam2v/application.py"
click node_game_host "https://github.com/vast-ai-research/edenlive/blob/main/realtime/games/host/demo-runtime.js"
click node_workbench "https://github.com/vast-ai-research/edenlive/tree/main/realtime/integrations_v2/eden/apps/workbench"
click node_first_frame "https://github.com/vast-ai-research/edenlive/blob/main/realtime/integrations_v2/eden/apps/workbench/flux_worker.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_offline_cli,node_engine,node_strategy,node_user,node_browser toneBlue
class node_model_adapter,node_wan_pipeline,node_encoders toneAmber
class node_session_runtime,node_session_contract,node_presentation,node_postprocess,node_webrtc toneMint
class node_game_input,node_game2v,node_cam2v,node_game_host toneRose
class node_workbench,node_first_frame,node_proxy,node_prompt toneIndigo
```

## Components

### Offline inference

- [Offline inference entry](https://github.com/vast-ai-research/edenlive/blob/main/edenlive/scripts/infer.py): `edenlive/scripts/infer.py`
- [Inference engine](https://github.com/vast-ai-research/edenlive/blob/main/edenlive/inference/engine.py): `edenlive/inference/engine.py`
- [Sampling strategies](https://github.com/vast-ai-research/edenlive/tree/main/edenlive/inference/strategies): `edenlive/inference/strategies`

### Model runtime

- [Model adapter](https://github.com/vast-ai-research/edenlive/tree/main/edenlive/models): `edenlive/models`
- [Wan generation pipeline](https://github.com/vast-ai-research/edenlive/blob/main/realtime/flashdreams/flashdreams/recipes/wan/pipeline.py): `realtime/flashdreams/flashdreams/recipes/wan/pipeline.py`
- [Text and image encoders](https://github.com/vast-ai-research/edenlive/tree/main/realtime/flashdreams/flashdreams/infra/encoder): `realtime/flashdreams/flashdreams/infra/encoder`

### Realtime streaming

- [Session runtime](https://github.com/vast-ai-research/edenlive/blob/main/realtime/flashdreams/flashdreams/api_v2/session.py): `realtime/flashdreams/flashdreams/api_v2/session.py`
- [Session description](https://github.com/vast-ai-research/edenlive/blob/main/realtime/flashdreams/flashdreams/runtime_v2/session_desc.py): `realtime/flashdreams/flashdreams/runtime_v2/session_desc.py`
- [Frame presentation](https://github.com/vast-ai-research/edenlive/blob/main/realtime/flashdreams/flashdreams/runtime_v2/presentation_manager.py): `realtime/flashdreams/flashdreams/runtime_v2/presentation_manager.py`
- [Video postprocessing](https://github.com/vast-ai-research/edenlive/tree/main/realtime/flashdreams/flashdreams/infra/postprocess): `realtime/flashdreams/flashdreams/infra/postprocess`
- [WebRTC output](https://github.com/vast-ai-research/edenlive/tree/main/realtime/flashdreams/flashdreams/runtime_v2/serving): `realtime/flashdreams/flashdreams/runtime_v2/serving`

### Interactive applications

- [Game reference input](https://github.com/vast-ai-research/edenlive/tree/main/realtime/games): `realtime/games`
- [Game-to-video app](https://github.com/vast-ai-research/edenlive/blob/main/realtime/integrations_v2/eden/apps/game2v/application.py): `realtime/integrations_v2/eden/apps/game2v/application.py`
- [Camera-to-video app](https://github.com/vast-ai-research/edenlive/blob/main/realtime/apps/cam2v/cam2v/application.py): `realtime/apps/cam2v/cam2v/application.py`
- [Game demo host](https://github.com/vast-ai-research/edenlive/blob/main/realtime/games/host/demo-runtime.js): `realtime/games/host/demo-runtime.js`

### Game workbench

- [Prompt-to-game workbench](https://github.com/vast-ai-research/edenlive/tree/main/realtime/integrations_v2/eden/apps/workbench): `realtime/integrations_v2/eden/apps/workbench`
- [First-frame renderer](https://github.com/vast-ai-research/edenlive/blob/main/realtime/integrations_v2/eden/apps/workbench/flux_worker.py): `realtime/integrations_v2/eden/apps/workbench/flux_worker.py`

### Other components

- **User**
- **Reference video**
- **Prompt and anchor**
- **Browser client**

## Connections

- User → Offline inference entry: starts inference (evidence: `README.md`)
- Reference video → Offline inference entry: provides frames (evidence: `README.md`)
- Prompt and anchor → Offline inference entry: guides generation (evidence: `README.md`)
- Offline inference entry → Inference engine: invokes
- Inference engine → Sampling strategies: dispatches (evidence: `edenlive/inference/engine.py`)
- Inference engine → Model adapter: generates with (evidence: `edenlive/inference/engine.py`)
- Wan generation pipeline → Text and image encoders: uses (evidence: `realtime/flashdreams/flashdreams/recipes/wan/pipeline.py`)
- User → Game demo host: plays (evidence: `README.md`)
- Game demo host → Game reference input: runs (evidence: `realtime/games/arcadeduel/main.js`)
- Game reference input → Game-to-video app: supplies frames (evidence: `README.md`)
- User → Camera-to-video app: provides camera input
- Game-to-video app → Session runtime: implements application (evidence: `realtime/integrations_v2/eden/apps/game2v/application.py`)
- Camera-to-video app → Session runtime: implements application (evidence: `realtime/apps/cam2v/cam2v/application.py`)
- Session runtime → Session description: configures session (evidence: `realtime/flashdreams/flashdreams/api_v2/session.py`)
- Session runtime → Frame presentation: buffers frames (evidence: `realtime/flashdreams/flashdreams/api_v2/session.py`)
- Game-to-video app → Wan generation pipeline: builds on
- Session runtime → Video postprocessing: supports processing
- Frame presentation → WebRTC output: streams frames
- WebRTC output → Browser client: delivers video (evidence: `README.md`)
- User → Prompt-to-game workbench: describes game (evidence: `README.md`)
- Prompt-to-game workbench → First-frame renderer: renders anchor (evidence: `README.md`)
- Prompt-to-game workbench → Game demo host: creates playable game (evidence: `README.md`)
