Update README.md
Browse files
README.md
CHANGED
@@ -202,7 +202,7 @@ export_to_video(video, "output.mp4", fps=24)
|
|
202 |
import torch
|
203 |
from diffusers import LTXConditionPipeline, LTXLatentUpsamplePipeline
|
204 |
from diffusers.pipelines.ltx.pipeline_ltx_condition import LTXVideoCondition
|
205 |
-
from diffusers.utils import export_to_video, load_image
|
206 |
|
207 |
pipe = LTXConditionPipeline.from_pretrained("Lightricks/LTX-Video-0.9.7-distilled", torch_dtype=torch.bfloat16)
|
208 |
pipe_upsample = LTXLatentUpsamplePipeline.from_pretrained("Lightricks/ltxv-spatial-upscaler-0.9.7", vae=pipe.vae, torch_dtype=torch.bfloat16)
|
@@ -216,10 +216,10 @@ def round_to_nearest_resolution_acceptable_by_vae(height, width):
|
|
216 |
return height, width
|
217 |
|
218 |
image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/penguin.png")
|
219 |
-
video = [image]
|
220 |
condition1 = LTXVideoCondition(video=video, frame_index=0)
|
221 |
|
222 |
-
prompt = "
|
223 |
negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted"
|
224 |
expected_height, expected_width = 832, 480
|
225 |
downscale_factor = 2 / 3
|
|
|
202 |
import torch
|
203 |
from diffusers import LTXConditionPipeline, LTXLatentUpsamplePipeline
|
204 |
from diffusers.pipelines.ltx.pipeline_ltx_condition import LTXVideoCondition
|
205 |
+
from diffusers.utils import export_to_video, load_image, load_video
|
206 |
|
207 |
pipe = LTXConditionPipeline.from_pretrained("Lightricks/LTX-Video-0.9.7-distilled", torch_dtype=torch.bfloat16)
|
208 |
pipe_upsample = LTXLatentUpsamplePipeline.from_pretrained("Lightricks/ltxv-spatial-upscaler-0.9.7", vae=pipe.vae, torch_dtype=torch.bfloat16)
|
|
|
216 |
return height, width
|
217 |
|
218 |
image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/penguin.png")
|
219 |
+
video = load_video(export_to_video([image]))
|
220 |
condition1 = LTXVideoCondition(video=video, frame_index=0)
|
221 |
|
222 |
+
prompt = "A cute little penguin takes out a book and starts reading it"
|
223 |
negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted"
|
224 |
expected_height, expected_width = 832, 480
|
225 |
downscale_factor = 2 / 3
|