Update README.md
#4
by
bweisslt
- opened
README.md
CHANGED
|
@@ -143,7 +143,7 @@ def round_to_nearest_resolution_acceptable_by_vae(height, width):
|
|
| 143 |
|
| 144 |
prompt = "The video depicts a winding mountain road covered in snow, with a single vehicle traveling along it. The road is flanked by steep, rocky cliffs and sparse vegetation. The landscape is characterized by rugged terrain and a river visible in the distance. The scene captures the solitude and beauty of a winter drive through a mountainous region."
|
| 145 |
negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted"
|
| 146 |
-
expected_height, expected_width =
|
| 147 |
downscale_factor = 2 / 3
|
| 148 |
num_frames = 121
|
| 149 |
|
|
@@ -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,12 +216,12 @@ 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 =
|
| 225 |
downscale_factor = 2 / 3
|
| 226 |
num_frames = 96
|
| 227 |
|
|
|
|
| 143 |
|
| 144 |
prompt = "The video depicts a winding mountain road covered in snow, with a single vehicle traveling along it. The road is flanked by steep, rocky cliffs and sparse vegetation. The landscape is characterized by rugged terrain and a river visible in the distance. The scene captures the solitude and beauty of a winter drive through a mountainous region."
|
| 145 |
negative_prompt = "worst quality, inconsistent motion, blurry, jittery, distorted"
|
| 146 |
+
expected_height, expected_width = 512, 704
|
| 147 |
downscale_factor = 2 / 3
|
| 148 |
num_frames = 121
|
| 149 |
|
|
|
|
| 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])) # compress the image using video compression as the model was trained on videos
|
| 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 = 480, 832
|
| 225 |
downscale_factor = 2 / 3
|
| 226 |
num_frames = 96
|
| 227 |
|