Views
No views yet
1from diffusers import DiffusionPipeline
2from diffusers.utils import load_image
3import torch
4
5pipe = DiffusionPipeline.from_pretrained(
6 "Lightricks/LTX-2",
7 custom_pipeline="multimodalart/ltx2-audio-to-video",
8 torch_dtype=torch.bfloat16
9)
10pipe.to("cuda")
11
12
13image = load_image("photo_2.jpeg")
14audio = "your_audio.wav"
15
16pipe.load_lora_weights("Lightricks/LTX-2-19b-LoRA-Camera-Control-Static") #this lora helps with keeping the camera steady for lip-sync purposes
17
18video, audio = pipe(
19 image=image,
20 audio=audio,
21 prompt="A person speaking, lips moving in sync with the words, talking head",
22 num_frames=141,
23 frame_rate=24.0,
24 return_dict=False,
25)