readme
Browse files
README.md
CHANGED
|
@@ -4,63 +4,13 @@ tags:
|
|
| 4 |
- image-to-video
|
| 5 |
---
|
| 6 |
|
| 7 |
-
|
| 8 |
|
| 9 |
-
|
| 10 |
|
| 11 |
-
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
dtype = torch.bfloat16
|
| 18 |
-
device = "cuda:0"
|
| 19 |
-
from diffusers import HunyuanVideo15ImageToVideoPipeline, attention_backend
|
| 20 |
-
from diffusers.utils import export_to_video, load_image
|
| 21 |
-
|
| 22 |
-
pipe = HunyuanVideo15ImageToVideoPipeline.from_pretrained("hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_i2v", torch_dtype=dtype)
|
| 23 |
-
pipe.enable_model_cpu_offload()
|
| 24 |
-
pipe.vae.enable_tiling()
|
| 25 |
-
|
| 26 |
-
generator = torch.Generator(device=device).manual_seed(1)
|
| 27 |
-
image = load_image("https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/wan_i2v_input.JPG")
|
| 28 |
-
prompt="Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."
|
| 29 |
-
with attention_backend("_flash_3_hub"): # or `"flash_hub"` if you are not using H100/H800
|
| 30 |
-
video = pipe(
|
| 31 |
-
prompt=prompt,
|
| 32 |
-
image=image,
|
| 33 |
-
generator=generator,
|
| 34 |
-
num_frames=121,
|
| 35 |
-
num_inference_steps=50,
|
| 36 |
-
).frames[0]
|
| 37 |
-
export_to_video(video, "output.mp4", fps=24)
|
| 38 |
-
```
|
| 39 |
-
|
| 40 |
-
To use default attention backend
|
| 41 |
-
|
| 42 |
-
```py
|
| 43 |
-
import torch
|
| 44 |
-
|
| 45 |
-
dtype = torch.bfloat16
|
| 46 |
-
device = "cuda:0"
|
| 47 |
-
from diffusers import HunyuanVideo15ImageToVideoPipeline
|
| 48 |
-
from diffusers.utils import export_to_video, load_image
|
| 49 |
-
|
| 50 |
-
pipe = HunyuanVideo15ImageToVideoPipeline.from_pretrained("hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_i2v", torch_dtype=dtype)
|
| 51 |
-
pipe.enable_model_cpu_offload()
|
| 52 |
-
pipe.vae.enable_tiling()
|
| 53 |
-
|
| 54 |
-
generator = torch.Generator(device=device).manual_seed(1)
|
| 55 |
-
image = load_image("https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/wan_i2v_input.JPG")
|
| 56 |
-
prompt="Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."
|
| 57 |
-
|
| 58 |
-
video = pipe(
|
| 59 |
-
prompt=prompt,
|
| 60 |
-
image=image,
|
| 61 |
-
generator=generator,
|
| 62 |
-
num_frames=121,
|
| 63 |
-
num_inference_steps=50,
|
| 64 |
-
).frames[0]
|
| 65 |
-
export_to_video(video, "output.mp4", fps=24)
|
| 66 |
-
```
|
|
|
|
| 4 |
- image-to-video
|
| 5 |
---
|
| 6 |
|
| 7 |
+
# HY-World 1.5 Diffusers
|
| 8 |
|
| 9 |
+
A Diffusers-compatible version of HY-World 1.5 for use with FastVideo.
|
| 10 |
|
| 11 |
+
## Model Sources
|
| 12 |
|
| 13 |
+
| Component | Source |
|
| 14 |
+
|-----------|--------|
|
| 15 |
+
| Transformer | [tencent/HY-WorldPlay (bidirectional_model)](https://huggingface.co/tencent/HY-WorldPlay/tree/main/bidirectional_model) |
|
| 16 |
+
| VAE, Text Encoder, Scheduler, etc. | [hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_i2v](https://huggingface.co/hunyuanvideo-community/HunyuanVideo-1.5-Diffusers-480p_i2v) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|