AI Toolkit Inference

Reproducible Diffusers LoRA inference pipelines for adapters trained with ostris/ai-toolkit.

Model Catalog · GitHub Repo

Docs Home · Model Catalog · HTTP API · Troubleshooting

LTX-2 LoRA Inference with Diffusers (AI Toolkit-trained)

API model id: ltx2
URL slug: ltx2

This page documents the reference Diffusers inference pipeline for ltx2 (LTX-2). It is designed for running LoRAs trained with ostris/ai-toolkit while minimizing training preview vs inference mismatch. If you are trying to reproduce AI Toolkit sample previews, treat the code linked below as the source of truth (scheduler wiring, resolution snapping, LoRA application, and conditioning).

Run in the cloud (optional): If you want to reproduce the examples on this page in a pinned runtime without local CUDA/driver setup (and reduce preview‑vs‑inference drift), run it via RunComfy’s Cloud AI Toolkit (Train + Inference). 👉 You can open it here: Cloud AI Toolkit (Train + Inference)

Quick facts

Field Value
Pipeline src/pipelines/ltx2.py
Base checkpoint Lightricks/LTX-2
Defaults sample_steps=25, guidance_scale=4.0, seed=42
Resolution snapping Floors width/height to a multiple of 32
Control image Optional (ctrl_img switches to I2V)
Video Yes (num_frames=41, fps=24 by default)
LoRA scale behavior LoRA is converted (AI Toolkit → diffusers) and then applied via fuse_lora(); scale is fixed after load.
Needs AI Toolkit Optional (recommended for LoRA conversion helpers via AI_TOOLKIT_PATH)

Reference implementation (source of truth)

Minimal API request

{
  "model": "ltx2",
  "trigger_word": "sks",
  "prompts": [
    {
      "prompt": "[trigger] a photo of a person",
      "width": 1024,
      "height": 1024,
      "seed": 42,
      "sample_steps": 25,
      "guidance_scale": 4.0,
      "neg": "",
      "num_frames": 41,
      "fps": 24
    }
  ],
  "loras": [
    {
      "path": "my_lora_job/my_lora.safetensors",
      "network_multiplier": 1.0
    }
  ]
}

Pipeline behavior that matters

Preview-matching notes (training preview vs inference mismatch)

What to compare when debugging mismatch