Views
No views yet
transformer_blocks of LTX2VideoTransformer3DModel
for ZeroGPU (sm120 / cu130). The package is the compiled graph only — no weights,
so it works with:fuse_lora, not set_adapters).LTX2InContextPipeline audio+video forward.conditioning_attention_mask (equivalently conditioning_attention_strength < 1.0) — e.g. inpaint, outpaint.ltx-community/LTX-2.3-Transformer-GroupA-sm120-cu130-r9e.stg_scale>0, perturbs only block 28) is not supported by this uniform per-block build.1import spaces, torch
2from diffusers import LTX2InContextPipeline
3
4pipe = LTX2InContextPipeline.from_pretrained(
5 "diffusers/LTX-2.3-Distilled-Diffusers", torch_dtype=torch.bfloat16
6).to("cuda")
7
8# fuse your IC-LoRA (the AOTI graph is weight-agnostic, but the LoRA must be FUSED, not set_adapters)
9pipe.load_lora_weights(my_lora_state_dict, adapter_name="x")
10pipe.fuse_lora(lora_scale=1.0)
11pipe.unload_lora_weights()
12
13# load the precompiled blocks AT ROOT LEVEL (ZeroGPU loads on cuda at module scope; do NOT
14# lazy-load or move to cuda inside @spaces.GPU — see the ZeroGPU model-loading docs)
15spaces.aoti_load(module=pipe.transformer, repo_id="ltx-community/LTX-2.3-Transformer-GroupB-sm120-cu130-r0e")
16
17@spaces.GPU
18def generate(*args, **kwargs):
19 return pipe(*args, **kwargs) # nothing AOTI-related in herejob.py.job.py that built it. To rebuild (or retarget to another GPU arch / base model), download it and run on HF Jobs:1hf jobs uv run job.py \
2 --flavor rtx-pro-6000 \
3 --image pytorch/pytorch:2.9.1-cuda13.0-cudnn9-devel \
4 --secrets HF_TOKENOUTPUT_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.