Fix typos
#3
by
tolgacangoz
- opened
README.md
CHANGED
|
@@ -63,10 +63,9 @@ The demos above showcase 30-second videos generated using our SkyReels-V2 Diffus
|
|
| 63 |
|
| 64 |
## 🚀 Quickstart
|
| 65 |
|
| 66 |
-
|
| 67 |
|
| 68 |
```py
|
| 69 |
-
# pip install ftfy
|
| 70 |
import numpy as np
|
| 71 |
import torch
|
| 72 |
from diffusers import AutoModel, SkyReelsV2ImageToVideoPipeline, UniPCMultistepScheduler
|
|
@@ -94,18 +93,6 @@ def aspect_ratio_resize(image, pipeline, max_area=720 * 1280):
|
|
| 94 |
image = image.resize((width, height))
|
| 95 |
return image, height, width
|
| 96 |
|
| 97 |
-
def center_crop_resize(image, height, width):
|
| 98 |
-
# Calculate resize ratio to match first frame dimensions
|
| 99 |
-
resize_ratio = max(width / image.width, height / image.height)
|
| 100 |
-
|
| 101 |
-
# Resize the image
|
| 102 |
-
width = round(image.width * resize_ratio)
|
| 103 |
-
height = round(image.height * resize_ratio)
|
| 104 |
-
size = [width, height]
|
| 105 |
-
image = TF.center_crop(image, size)
|
| 106 |
-
|
| 107 |
-
return image, height, width
|
| 108 |
-
|
| 109 |
first_frame, height, width = aspect_ratio_resize(first_frame, pipeline)
|
| 110 |
|
| 111 |
prompt = "CG animation style, a small blue bird takes off from the ground, flapping its wings. The bird's feathers are delicate, with a unique pattern on its chest. The background shows a blue sky with white clouds under bright sunshine. The camera follows the bird upward, capturing its flight and the vastness of the sky from a close-up, low-angle perspective."
|
|
|
|
| 63 |
|
| 64 |
## 🚀 Quickstart
|
| 65 |
|
| 66 |
+
[SkyReels-V2](https://huggingface.co/docs/diffusers/main/en/api/pipelines/skyreels_v2) can be run directly using 🤗 Diffusers!
|
| 67 |
|
| 68 |
```py
|
|
|
|
| 69 |
import numpy as np
|
| 70 |
import torch
|
| 71 |
from diffusers import AutoModel, SkyReelsV2ImageToVideoPipeline, UniPCMultistepScheduler
|
|
|
|
| 93 |
image = image.resize((width, height))
|
| 94 |
return image, height, width
|
| 95 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
first_frame, height, width = aspect_ratio_resize(first_frame, pipeline)
|
| 97 |
|
| 98 |
prompt = "CG animation style, a small blue bird takes off from the ground, flapping its wings. The bird's feathers are delicate, with a unique pattern on its chest. The background shows a blue sky with white clouds under bright sunshine. The camera follows the bird upward, capturing its flight and the vastness of the sky from a close-up, low-angle perspective."
|