Views
No views yet
ltx-2.3-22b-dev.safetensors on custom data.ltx-2.3-22b-dev.safetensorsLTX-2.3 support is currently on the diffusersmainbranch:pip install git+https://github.com/huggingface/diffusers.git
1import torch
2from diffusers import LTX2ImageToVideoPipeline
3from diffusers.utils import load_image
4from diffusers.pipelines.ltx2.export_utils import encode_video
5from diffusers.pipelines.ltx2.utils import DEFAULT_NEGATIVE_PROMPT
6
7pipe = LTX2ImageToVideoPipeline.from_pretrained(
8 "diffusers/LTX-2.3-Diffusers", torch_dtype=torch.bfloat16
9)
10pipe.enable_model_cpu_offload()
11
12# Load this LoRA
13pipe.load_lora_weights("Levmar/ltx2-lora", weight_name="lora_weights_step_06000.safetensors", adapter_name="lora")
14pipe.set_adapters("lora", 1.0)
15
16video, audio = pipe(
17 prompt="<your prompt>",
18 negative_prompt=DEFAULT_NEGATIVE_PROMPT,
19 image=load_image("first_frame.png"),
20 width=768, height=512, num_frames=49, frame_rate=25.0,
21 num_inference_steps=30, guidance_scale=4.0,
22 output_type="np", return_dict=False,
23)
24encode_video(video[0], fps=25.0, output_path="output.mp4").safetensors file) to the models/loras folder in your ComfyUI installation.ltx-2.3-22b-dev.safetensors).