Update README.md
#4
by
TheBigBlockPC
- opened
README.md
CHANGED
|
@@ -46,6 +46,9 @@ You can use the model for purposes under the license:
|
|
| 46 |
* The model works on resolutions that are divisible by 32 and number of frames that are divisible by 8 + 1 (e.g. 257). In case the resolution or number of frames are not divisible by 32 or 8 + 1, the input will be padded with -1 and then cropped to the desired resolution and number of frames.
|
| 47 |
* The model works best on resolutions under 720 x 1280 and number of frames below 257.
|
| 48 |
* Prompts should be in English. The more elaborate the better. Good prompt looks like `The turquoise waves crash against the dark, jagged rocks of the shore, sending white foam spraying into the air. The scene is dominated by the stark contrast between the bright blue water and the dark, almost black rocks. The water is a clear, turquoise color, and the waves are capped with white foam. The rocks are dark and jagged, and they are covered in patches of green moss. The shore is lined with lush green vegetation, including trees and bushes. In the background, there are rolling hills covered in dense forest. The sky is cloudy, and the light is dim.`
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
### Online demo
|
| 51 |
The model is accessible right away via following links:
|
|
@@ -114,7 +117,7 @@ import torch
|
|
| 114 |
from diffusers.pipelines.ltx.pipeline_ltx_condition import LTXConditionPipeline, LTXVideoCondition
|
| 115 |
from diffusers.utils import export_to_video, load_video, load_image
|
| 116 |
|
| 117 |
-
|
| 118 |
repo = "Lightricks/LTX-Video-0.9.5"
|
| 119 |
pipe = LTXConditionPipeline.from_pretrained(repo, torch_dtype=dtype)
|
| 120 |
pipe.to("cuda")
|
|
@@ -141,7 +144,7 @@ condition2 = LTXVideoCondition(
|
|
| 141 |
prompt = "The video depicts a long, straight highway stretching into the distance, flanked by metal guardrails. The road is divided into multiple lanes, with a few vehicles visible in the far distance. The surrounding landscape features dry, grassy fields on one side and rolling hills on the other. The sky is mostly clear with a few scattered clouds, suggesting a bright, sunny day. And then the camera switch to a inding 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."
|
| 142 |
negative_prompt='worst quality, inconsistent motion, blurry, jittery, distorted'
|
| 143 |
# Generate the video
|
| 144 |
-
generator = torch.Generator(device=
|
| 145 |
video = pipe(
|
| 146 |
conditions=[condition1, condition2],
|
| 147 |
prompt=prompt,
|
|
|
|
| 46 |
* The model works on resolutions that are divisible by 32 and number of frames that are divisible by 8 + 1 (e.g. 257). In case the resolution or number of frames are not divisible by 32 or 8 + 1, the input will be padded with -1 and then cropped to the desired resolution and number of frames.
|
| 47 |
* The model works best on resolutions under 720 x 1280 and number of frames below 257.
|
| 48 |
* Prompts should be in English. The more elaborate the better. Good prompt looks like `The turquoise waves crash against the dark, jagged rocks of the shore, sending white foam spraying into the air. The scene is dominated by the stark contrast between the bright blue water and the dark, almost black rocks. The water is a clear, turquoise color, and the waves are capped with white foam. The rocks are dark and jagged, and they are covered in patches of green moss. The shore is lined with lush green vegetation, including trees and bushes. In the background, there are rolling hills covered in dense forest. The sky is cloudy, and the light is dim.`
|
| 49 |
+
* Referecne images/videos should align with the prompt for optimal performance.
|
| 50 |
+
* Too different reference videos/imeges can return bad results.
|
| 51 |
+
* Reference images are strongly recommended for tbest quality.
|
| 52 |
|
| 53 |
### Online demo
|
| 54 |
The model is accessible right away via following links:
|
|
|
|
| 117 |
from diffusers.pipelines.ltx.pipeline_ltx_condition import LTXConditionPipeline, LTXVideoCondition
|
| 118 |
from diffusers.utils import export_to_video, load_video, load_image
|
| 119 |
|
| 120 |
+
dtype = torch.bfloat16
|
| 121 |
repo = "Lightricks/LTX-Video-0.9.5"
|
| 122 |
pipe = LTXConditionPipeline.from_pretrained(repo, torch_dtype=dtype)
|
| 123 |
pipe.to("cuda")
|
|
|
|
| 144 |
prompt = "The video depicts a long, straight highway stretching into the distance, flanked by metal guardrails. The road is divided into multiple lanes, with a few vehicles visible in the far distance. The surrounding landscape features dry, grassy fields on one side and rolling hills on the other. The sky is mostly clear with a few scattered clouds, suggesting a bright, sunny day. And then the camera switch to a inding 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 |
# Generate the video
|
| 147 |
+
generator = torch.Generator(device="cuda").manual_seed(0)
|
| 148 |
video = pipe(
|
| 149 |
conditions=[condition1, condition2],
|
| 150 |
prompt=prompt,
|