--- title: LTX-2.3 LoRA Trainer emoji: 🎬 colorFrom: indigo colorTo: purple sdk: gradio sdk_version: 6.18.0 app_file: app.py pinned: true hardware: cpu-basic hf_oauth: true hf_oauth_scopes: - read-repos - write-repos - manage-repos - jobs --- # LTX-2.3 LoRA Trainer (HF Jobs) Train a **LoRA / IC-LoRA for LTX-2.3** from your own videos, entirely on Hugging Face infrastructure: - **Sign in with Hugging Face** — the dataset, the job, and the pushed LoRA all run under **your** account and billing (no pasted tokens); - the **Space** (this app, `cpu-basic`) collects your videos + hyperparameters and submits a job; - training runs on **HF Jobs**, reproducing the trainer environment from the monorepo lockfile (`uv sync --frozen`); - your dataset is staged on **HF buckets** (`hf://buckets//ltx2-train-`); - the trained LoRA is pushed to the Hub model repo you choose. You only pay for the Job's actual GPU runtime. ## Setup Just **sign in with Hugging Face** in the app — the OAuth token (scopes: repos + `jobs`) is used to create buckets, submit the job, download the gated Gemma encoder, and push the LoRA, all as the signed-in user. No Space secret is required. The job pulls the trainer source from the bucket **`LTX_SRC_BUCKET`** (default `linoyts/ltx2-trainer-src`). To use your own, upload the monorepo (`pyproject.toml`, `uv.lock`, `packages/`) to a bucket and set the `LTX_SRC_BUCKET` Space variable. ## Usage 1. Sign in with Hugging Face. 2. Pick a mode and upload your videos: - **IC-LoRA (in-context control):** upload each target `clip.mp4` **and** its control video `clip_reference.mp4` (depth, pose, edges, an inpainting-masked version, …) — matched by filename. References are user-supplied; nothing is auto-derived. - **T2V / I2V:** upload only the target clips. 3. Add one caption per line (in filename order of the target clips), set hyperparameters and a Hub model id, then **Submit training job**. 4. Copy the job id into the monitor box and **Refresh** to stream logs. The job: sync buckets → `uv sync` → download base checkpoint + Gemma → `process_dataset.py` → `train.py` → push LoRA to the Hub. ## Notes - Resolution: W,H divisible by 32; frames `F % 8 == 1` (25, 49, 81, …). - `a100-large` (80 GB) fits the 22B model in bf16; INT8 quantization is optional. - First job is slow to start (env build + ~67 GB of model downloads) before training begins.