# lightricks/ltx-desktop architecture

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

- Interactive diagram: https://gitdiagram.com/lightricks/ltx-desktop
- Repository: https://github.com/lightricks/ltx-desktop

## Overview

LTX Desktop is a desktop video-generation and editing app with local model inference or an optional cloud API. The principal workflow is to choose a generation mode and prompt in the UI, submit a job, run it through backend generation services, and use the resulting media in the editor. The README documents the major generation capabilities; the sampled backend excerpts show application composition and pipeline construction. Connections not established by those sources are omitted.

Main entry points: [`frontend/hooks/use-generation.ts`](https://github.com/lightricks/ltx-desktop/blob/main/frontend/hooks/use-generation.ts) (Generation controls), [`backend/handlers/pipelines_handler.py`](https://github.com/lightricks/ltx-desktop/blob/main/backend/handlers/pipelines_handler.py) (Pipeline lifecycle), [`backend/app_handler.py`](https://github.com/lightricks/ltx-desktop/blob/main/backend/app_handler.py) (App composition), [`frontend/App.tsx`](https://github.com/lightricks/ltx-desktop/blob/main/frontend/App.tsx) (App interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop shell"]
  node_electron["Desktop runtime<br/>[main.ts]"]
end

subgraph group_experience["Generation and editing UI"]
  node_frontend["App interface<br/>[App.tsx]"]
  node_generation_ui["Generation controls<br/>[use-generation.ts]"]
  node_editor["Video editor<br/>[useTimelineDrag.ts]"]
  node_api_client["Backend client<br/>[api-client.ts]"]
  node_project_storage[("Editor projects<br/>[project-storage.ts]")]
end

subgraph group_backend["Backend API and orchestration"]
  node_api["HTTP API<br/>[ltx2_server.py]"]
  node_app_handler["App composition<br/>[app_handler.py]"]
  node_pipeline_handler["Pipeline lifecycle"]
  node_generation_handler["Generation handling"]
  node_job_queue["Generation queue<br/>[runner.py]"]
  node_remote_access["Remote access<br/>[controller.py]"]
end

subgraph group_inference["Inference and media"]
  node_video_pipelines["Video generation"]
  node_a2v_pipeline["Audio-to-video"]
  node_ic_lora_pipeline["IC-LoRA"]
  node_retake_pipeline["Retake and extend"]
  node_image_pipeline["Image generation"]
  node_api_mode["Cloud generation<br/>[ltx_api_client.py]"]
end

subgraph group_state["Configuration and state"]
  node_settings["App settings<br/>[app_settings.py]"]
  node_runtime_config["Runtime policy<br/>[runtime_policy.py]"]
end

node_creator(("Creator"))

node_creator -->|"uses"| node_frontend
node_creator -->|"edits video"| node_editor
node_frontend -->|"offers generation"| node_generation_ui
node_generation_ui -.->|"submits jobs"| node_api_client
node_api_client -.->|"sends requests"| node_api
node_api -.->|"delegates"| node_app_handler
node_app_handler -->|"wires"| node_pipeline_handler
node_pipeline_handler -->|"creates"| node_video_pipelines
node_pipeline_handler -->|"creates"| node_image_pipeline
node_pipeline_handler -->|"creates"| node_ic_lora_pipeline
node_pipeline_handler -->|"creates"| node_a2v_pipeline
node_pipeline_handler -->|"creates"| node_retake_pipeline
node_generation_handler -.->|"queues jobs"| node_job_queue
node_generation_ui -.->|"supports text and image video"| node_video_pipelines
node_generation_ui -->|"supports audio video"| node_a2v_pipeline
node_generation_ui -->|"supports IC-LoRA"| node_ic_lora_pipeline
node_generation_ui -->|"supports retake"| node_retake_pipeline
node_generation_ui -->|"supports image creation and editing"| node_image_pipeline
node_generation_ui -->|"offers API mode"| node_api_mode
node_editor -->|"stores projects"| node_project_storage
node_app_handler -->|"loads settings"| node_settings
node_pipeline_handler -->|"uses policy"| node_runtime_config
node_electron -.->|"hosts interface"| node_frontend
node_remote_access -->|"controls exposure"| node_app_handler

click node_electron "https://github.com/lightricks/ltx-desktop/blob/main/electron/main.ts"
click node_frontend "https://github.com/lightricks/ltx-desktop/blob/main/frontend/App.tsx"
click node_generation_ui "https://github.com/lightricks/ltx-desktop/blob/main/frontend/hooks/use-generation.ts"
click node_editor "https://github.com/lightricks/ltx-desktop/blob/main/frontend/views/editor/useTimelineDrag.ts"
click node_api_client "https://github.com/lightricks/ltx-desktop/blob/main/frontend/lib/api-client.ts"
click node_api "https://github.com/lightricks/ltx-desktop/blob/main/backend/ltx2_server.py"
click node_app_handler "https://github.com/lightricks/ltx-desktop/blob/main/backend/app_handler.py"
click node_pipeline_handler "https://github.com/lightricks/ltx-desktop/blob/main/backend/handlers/pipelines_handler.py"
click node_generation_handler "https://github.com/lightricks/ltx-desktop/blob/main/backend/handlers/generation_handler.py"
click node_job_queue "https://github.com/lightricks/ltx-desktop/blob/main/backend/services/generation_queue/runner.py"
click node_video_pipelines "https://github.com/lightricks/ltx-desktop/blob/main/backend/services/fast_video_pipeline/ltx_fast_video_pipeline.py"
click node_a2v_pipeline "https://github.com/lightricks/ltx-desktop/blob/main/backend/services/a2v_pipeline/distilled_a2v_pipeline.py"
click node_ic_lora_pipeline "https://github.com/lightricks/ltx-desktop/blob/main/backend/services/ic_lora_pipeline/ltx_ic_lora_pipeline.py"
click node_retake_pipeline "https://github.com/lightricks/ltx-desktop/blob/main/backend/services/retake_pipeline/ltx_retake_pipeline.py"
click node_image_pipeline "https://github.com/lightricks/ltx-desktop/blob/main/backend/services/image_generation_pipeline/image_generation_pipeline.py"
click node_api_mode "https://github.com/lightricks/ltx-desktop/blob/main/backend/services/ltx_api_client/ltx_api_client.py"
click node_settings "https://github.com/lightricks/ltx-desktop/blob/main/backend/state/app_settings.py"
click node_runtime_config "https://github.com/lightricks/ltx-desktop/blob/main/backend/runtime_config/runtime_policy.py"
click node_project_storage "https://github.com/lightricks/ltx-desktop/blob/main/frontend/lib/project-storage.ts"
click node_remote_access "https://github.com/lightricks/ltx-desktop/blob/main/backend/remote/controller.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_electron toneBlue
class node_frontend,node_generation_ui,node_editor,node_api_client,node_project_storage toneAmber
class node_api,node_app_handler,node_pipeline_handler,node_generation_handler,node_job_queue,node_remote_access toneMint
class node_video_pipelines,node_a2v_pipeline,node_ic_lora_pipeline,node_retake_pipeline,node_image_pipeline,node_api_mode toneRose
class node_settings,node_runtime_config,node_creator toneIndigo
```

## Components

### Desktop shell

- [Desktop runtime](https://github.com/lightricks/ltx-desktop/blob/main/electron/main.ts): `electron/main.ts`

### Generation and editing UI

- [App interface](https://github.com/lightricks/ltx-desktop/blob/main/frontend/App.tsx): `frontend/App.tsx`
- [Generation controls](https://github.com/lightricks/ltx-desktop/blob/main/frontend/hooks/use-generation.ts): `frontend/hooks/use-generation.ts`
- [Video editor](https://github.com/lightricks/ltx-desktop/blob/main/frontend/views/editor/useTimelineDrag.ts): `frontend/views/editor/useTimelineDrag.ts`
- [Backend client](https://github.com/lightricks/ltx-desktop/blob/main/frontend/lib/api-client.ts): `frontend/lib/api-client.ts`
- [Editor projects](https://github.com/lightricks/ltx-desktop/blob/main/frontend/lib/project-storage.ts): `frontend/lib/project-storage.ts`

### Backend API and orchestration

- [HTTP API](https://github.com/lightricks/ltx-desktop/blob/main/backend/ltx2_server.py): `backend/ltx2_server.py`
- [App composition](https://github.com/lightricks/ltx-desktop/blob/main/backend/app_handler.py): `backend/app_handler.py`
- [Pipeline lifecycle](https://github.com/lightricks/ltx-desktop/blob/main/backend/handlers/pipelines_handler.py): `backend/handlers/pipelines_handler.py`
- [Generation handling](https://github.com/lightricks/ltx-desktop/blob/main/backend/handlers/generation_handler.py): `backend/handlers/generation_handler.py`
- [Generation queue](https://github.com/lightricks/ltx-desktop/blob/main/backend/services/generation_queue/runner.py): `backend/services/generation_queue/runner.py`
- [Remote access](https://github.com/lightricks/ltx-desktop/blob/main/backend/remote/controller.py): `backend/remote/controller.py`

### Inference and media

- [Video generation](https://github.com/lightricks/ltx-desktop/blob/main/backend/services/fast_video_pipeline/ltx_fast_video_pipeline.py): `backend/services/fast_video_pipeline/ltx_fast_video_pipeline.py`
- [Audio-to-video](https://github.com/lightricks/ltx-desktop/blob/main/backend/services/a2v_pipeline/distilled_a2v_pipeline.py): `backend/services/a2v_pipeline/distilled_a2v_pipeline.py`
- [IC-LoRA](https://github.com/lightricks/ltx-desktop/blob/main/backend/services/ic_lora_pipeline/ltx_ic_lora_pipeline.py): `backend/services/ic_lora_pipeline/ltx_ic_lora_pipeline.py`
- [Retake and extend](https://github.com/lightricks/ltx-desktop/blob/main/backend/services/retake_pipeline/ltx_retake_pipeline.py): `backend/services/retake_pipeline/ltx_retake_pipeline.py`
- [Image generation](https://github.com/lightricks/ltx-desktop/blob/main/backend/services/image_generation_pipeline/image_generation_pipeline.py): `backend/services/image_generation_pipeline/image_generation_pipeline.py`
- [Cloud generation](https://github.com/lightricks/ltx-desktop/blob/main/backend/services/ltx_api_client/ltx_api_client.py): `backend/services/ltx_api_client/ltx_api_client.py`

### Configuration and state

- [App settings](https://github.com/lightricks/ltx-desktop/blob/main/backend/state/app_settings.py): `backend/state/app_settings.py`
- [Runtime policy](https://github.com/lightricks/ltx-desktop/blob/main/backend/runtime_config/runtime_policy.py): `backend/runtime_config/runtime_policy.py`

### Other components

- **Creator**

## Connections

- Creator → App interface: uses (evidence: `README.md`)
- Creator → Video editor: edits video (evidence: `README.md`)
- App interface → Generation controls: offers generation (evidence: `README.md`)
- Generation controls → Backend client: submits jobs
- Backend client → HTTP API: sends requests
- HTTP API → App composition: delegates
- App composition → Pipeline lifecycle: wires (evidence: `backend/app_handler.py`)
- Pipeline lifecycle → Video generation: creates (evidence: `backend/handlers/pipelines_handler.py`)
- Pipeline lifecycle → Image generation: creates (evidence: `backend/handlers/pipelines_handler.py`)
- Pipeline lifecycle → IC-LoRA: creates (evidence: `backend/handlers/pipelines_handler.py`)
- Pipeline lifecycle → Audio-to-video: creates (evidence: `backend/handlers/pipelines_handler.py`)
- Pipeline lifecycle → Retake and extend: creates (evidence: `backend/handlers/pipelines_handler.py`)
- Generation handling → Generation queue: queues jobs
- Generation controls → Video generation: supports text and image video
- Generation controls → Audio-to-video: supports audio video (evidence: `README.md`)
- Generation controls → IC-LoRA: supports IC-LoRA (evidence: `README.md`)
- Generation controls → Retake and extend: supports retake (evidence: `README.md`)
- Generation controls → Image generation: supports image creation and editing (evidence: `README.md`)
- Generation controls → Cloud generation: offers API mode (evidence: `README.md`)
- Video editor → Editor projects: stores projects (evidence: `frontend/lib/project-storage.ts`)
- App composition → App settings: loads settings (evidence: `backend/app_handler.py`)
- Pipeline lifecycle → Runtime policy: uses policy (evidence: `backend/handlers/pipelines_handler.py`)
- Desktop runtime → App interface: hosts interface
- Remote access → App composition: controls exposure (evidence: `backend/remote/controller.py`)
