Views
No views yet
1import torch
2from diffusers import LTXPipeline
3from diffusers.utils import export_to_video
4
5pipe = LTXPipeline.from_pretrained("a-r-r-o-w/LTX-Video-0.9.1-diffusers", torch_dtype=torch.bfloat16)
6pipe.to("cuda")
7
8prompt = "A woman with long brown hair and light skin smiles at another woman with long blonde hair. The woman with brown hair wears a black jacket and has a small, barely noticeable mole on her right cheek. The camera angle is a close-up, focused on the woman with brown hair's face. The lighting is warm and natural, likely from the setting sun, casting a soft glow on the scene. The scene appears to be real-life footage"
9negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted"
10
11video = pipe(
12 prompt=prompt,
13 negative_prompt=negative_prompt,
14 width=704,
15 height=480,
16 num_frames=161,
17 num_inference_steps=50,
18 decode_timestep=0.03,
19 decode_noise_scale=0.025,
20).frames[0]
21export_to_video(video, "output.mp4", fps=24)1import torch
2from diffusers import LTXImageToVideoPipeline
3from diffusers.utils import export_to_video, load_image
4
5pipe = LTXImageToVideoPipeline.from_pretrained("a-r-r-o-w/LTX-Video-0.9.1-diffusers", torch_dtype=torch.bfloat16)
6pipe.to("cuda")
7
8image = load_image(
9 "https://huggingface.co/datasets/a-r-r-o-w/tiny-meme-dataset-captioned/resolve/main/images/8.png"
10)
11prompt = "A young girl stands calmly in the foreground, looking directly at the camera, as a house fire rages in the background. Flames engulf the structure, with smoke billowing into the air. Firefighters in protective gear rush to the scene, a fire truck labeled '38' visible behind them. The girl's neutral expression contrasts sharply with the chaos of the fire, creating a poignant and emotionally charged scene."
12negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted"
13
14video = pipe(
15 image=image,
16 prompt=prompt,
17 negative_prompt=negative_prompt,
18 width=704,
19 height=480,
20 num_frames=161,
21 num_inference_steps=50,
22 decode_timestep=0.03,
23 decode_noise_scale=0.025,
24).frames[0]
25export_to_video(video, "output.mp4", fps=24)