a-r-r-o-w HF staff commited on
Commit
1e970af
·
verified ·
1 Parent(s): 71c9779

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +61 -0
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: text-to-video
3
+ library_name: diffusers
4
+ tags:
5
+ - text-to-video
6
+ - image-to-video
7
+ ---
8
+
9
+ Unofficial Diffusers-format weights for https://huggingface.co/Lightricks/LTX-Video (version 0.9.0).
10
+
11
+ Text-to-Video:
12
+
13
+ ```python
14
+ import torch
15
+ from diffusers import LTXPipeline
16
+ from diffusers.utils import export_to_video
17
+
18
+ pipe = LTXPipeline.from_pretrained("a-r-r-o-w/LTX-Video-diffusers", torch_dtype=torch.bfloat16)
19
+ pipe.to("cuda")
20
+
21
+ prompt = "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"
22
+ negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted"
23
+
24
+ video = pipe(
25
+ prompt=prompt,
26
+ negative_prompt=negative_prompt,
27
+ width=704,
28
+ height=480,
29
+ num_frames=161,
30
+ num_inference_steps=50,
31
+ ).frames[0]
32
+ export_to_video(video, "output.mp4", fps=24)
33
+ ```
34
+
35
+ Image-to-Video:
36
+
37
+ ```python
38
+ import torch
39
+ from diffusers import LTXImageToVideoPipeline
40
+ from diffusers.utils import export_to_video, load_image
41
+
42
+ pipe = LTXImageToVideoPipeline.from_pretrained("a-r-r-o-w/LTX-Video-diffusers", torch_dtype=torch.bfloat16)
43
+ pipe.to("cuda")
44
+
45
+ image = load_image(
46
+ "https://huggingface.co/datasets/a-r-r-o-w/tiny-meme-dataset-captioned/resolve/main/images/8.png"
47
+ )
48
+ prompt = "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."
49
+ negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted"
50
+
51
+ video = pipe(
52
+ image=image,
53
+ prompt=prompt,
54
+ negative_prompt=negative_prompt,
55
+ width=704,
56
+ height=480,
57
+ num_frames=161,
58
+ num_inference_steps=50,
59
+ ).frames[0]
60
+ export_to_video(video, "output.mp4", fps=24)
61
+ ```