Views
No views yet
rootonchair/LTX-2.3-Distilled-v1.1-Diffusers,
a Diffusers conversion of the v1.1 distilled checkpoint of
Lightricks/LTX-2.3 — a DiT-based
foundation model that jointly generates synchronized video and audio. Runs in
8 steps with CFG = 1.diffuse_compressor
and exported via examples/convert_nunchaku_lite_diffusers.py to Diffusers'
native Nunchaku Lite format. Loading requires Diffusers' NunchakuLiteQuantizer
(baked into transformer/config.json's quantization_config) plus the
kernels package for the compiled CUDA
kernels.bitsandbytes (baked into text_encoder/config.json's
quantization_config), to reduce host RAM/VRAM footprint alongside the
quantized transformer.LTX2TextConnectors, the text-conditioning adapter run once
per generation before the denoising loop — memory-bound like the text
encoder, not compute-bound like the DiT): also quantized to BNB4 NF4 via
bitsandbytes (baked into connectors/config.json's quantization_config),
shrinking it from ~6GB to ~1.7GB.pipe.to("cuda") (weights only): ~23.9 GBenable_model_cpu_offload() / enable_sequential_cpu_offload()).from_pretrained + pipe.to("cuda"), locally cached): ~5s (one-time)kernels and bitsandbytes:pip install -U git+https://github.com/huggingface/diffusers kernels bitsandbytes1import torch
2from diffusers import LTX2Pipeline
3from diffusers.pipelines.ltx2.export_utils import encode_video
4from diffusers.pipelines.ltx2.utils import DEFAULT_NEGATIVE_PROMPT, DISTILLED_SIGMA_VALUES
5
6pipe = LTX2Pipeline.from_pretrained(
7 "lite-infer/LTX-2.3-Distilled-v1.1-Diffusers-nunchaku-lite-nvfp4-bnb4-text-encoder",
8 torch_dtype=torch.bfloat16,
9)
10pipe = pipe.to("cuda")
11
12prompt = "A flowing river in a forest at golden hour, gentle wind in the leaves."
13frame_rate = 24.0
14
15video, audio = pipe(
16 prompt=prompt,
17 negative_prompt=DEFAULT_NEGATIVE_PROMPT,
18 width=768,
19 height=512,
20 num_frames=121,
21 frame_rate=frame_rate,
22 num_inference_steps=8,
23 sigmas=DISTILLED_SIGMA_VALUES,
24 guidance_scale=1.0,
25 output_type="np",
26 return_dict=False,
27)
28
29encode_video(
30 video[0],
31 fps=frame_rate,
32 audio=audio[0].float().cpu(),
33 audio_sample_rate=pipe.vocoder.config.output_sampling_rate,
34 output_path="ltx2_distilled_v1_1_nvfp4.mp4",
35)width/height must be divisible by 32; num_frames must equal 8k + 1.sigmas=DISTILLED_SIGMA_VALUES, num_inference_steps=8, guidance_scale=1.0
for this distilled checkpoint.transformer/config.json,
text_encoder/config.json, and connectors/config.json, so no
PipelineQuantizationConfig is needed at load time.