How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("ltx-community/LTX-2.3-Transformer-GroupB-sm120-cu130-r0e", dtype=torch.bfloat16, device_map="cuda")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]

LTX-2.3 Transformer β€” AOTI build (in-context, with self-attention mask)

Ahead-of-time precompiled transformer_blocks of LTX2VideoTransformer3DModel for ZeroGPU (sm120 / cu130). The package is the compiled graph only β€” no weights, so it works with:

  • the base and distilled LTX-2.3 (identical architecture), and
  • any LoRA, as long as it's fused into the transformer (fuse_lora, not set_adapters).

Dynamic over video- and audio-token counts β†’ one binary serves any resolution / frame count / duration. Compiled for the LTX2InContextPipeline audio+video forward.

When to use this repo

  • This build: in-context demos that pass a conditioning_attention_mask (equivalently conditioning_attention_strength < 1.0) β€” e.g. inpaint, outpaint.
  • Demos that don't pass that mask β†’ use ltx-community/LTX-2.3-Transformer-GroupA-sm120-cu130-r9e.
  • STG (stg_scale>0, perturbs only block 28) is not supported by this uniform per-block build.

Use it (ZeroGPU) β€” load at the root module level

import spaces, torch
from diffusers import LTX2InContextPipeline

pipe = LTX2InContextPipeline.from_pretrained(
    "diffusers/LTX-2.3-Distilled-Diffusers", torch_dtype=torch.bfloat16
).to("cuda")

# fuse your IC-LoRA (the AOTI graph is weight-agnostic, but the LoRA must be FUSED, not set_adapters)
pipe.load_lora_weights(my_lora_state_dict, adapter_name="x")
pipe.fuse_lora(lora_scale=1.0)
pipe.unload_lora_weights()

# load the precompiled blocks AT ROOT LEVEL (ZeroGPU loads on cuda at module scope; do NOT
# lazy-load or move to cuda inside @spaces.GPU β€” see the ZeroGPU model-loading docs)
spaces.aoti_load(module=pipe.transformer, repo_id="ltx-community/LTX-2.3-Transformer-GroupB-sm120-cu130-r0e")

@spaces.GPU
def generate(*args, **kwargs):
    return pipe(*args, **kwargs)   # nothing AOTI-related in here

Public repo (graph only) β†’ no token needed. Built with the job in this repo's job.py.

How to reproduce or customize

This repo bundles the job.py that built it. To rebuild (or retarget to another GPU arch / base model), download it and run on HF Jobs:

hf jobs uv run job.py \
    --flavor rtx-pro-6000 \
    --image pytorch/pytorch:2.9.1-cuda13.0-cudnn9-devel \
    --secrets HF_TOKEN

Customize the output repo name with OUTPUT_REPO_BASE_NAME / OUTPUT_REPO_ID, and set LTX_GROUP_B=1 (this build adds the in-context self-attention mask). The exact build environment (torch 2.12.0+cu130, etc.) is recorded in environment.json.

Job run

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for ltx-community/LTX-2.3-Transformer-GroupB-sm120-cu130-r0e

Finetuned
(7)
this model