Update README.md
Browse files
README.md
CHANGED
@@ -28,26 +28,20 @@ You will also need to install [flash-attn](https://github.com/Dao-AILab/flash-at
|
|
28 |
Please note that you need at least 80GB VRAM to run this pipeline. CPU offloading is having issues at the moment (PRs welcome!).
|
29 |
|
30 |
```python
|
31 |
-
import torch
|
32 |
from hyvideo.diffusion.pipelines.pipeline_hunyuan_video import HunyuanVideoPipeline
|
33 |
from hyvideo.modules.models import HYVideoDiffusionTransformer
|
34 |
from hyvideo.vae.autoencoder_kl_causal_3d import AutoencoderKLCausal3D
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
pipe = HunyuanVideoPipeline.from_pretrained(
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
torch_dtype=torch.bfloat16,
|
41 |
-
subfolder='transformer'
|
42 |
-
),
|
43 |
-
vae=AutoencoderKLCausal3D.from_pretrained(
|
44 |
-
'magespace/hyvideo-diffusers',
|
45 |
-
torch_dtype=torch.bfloat16,
|
46 |
-
subfolder='vae'
|
47 |
-
),
|
48 |
-
torch_dtype=torch.bfloat16,
|
49 |
-
)
|
50 |
-
pipe = pipe.to('cuda')
|
51 |
pipe.vae.enable_tiling()
|
52 |
```
|
53 |
|
|
|
28 |
Please note that you need at least 80GB VRAM to run this pipeline. CPU offloading is having issues at the moment (PRs welcome!).
|
29 |
|
30 |
```python
|
|
|
31 |
from hyvideo.diffusion.pipelines.pipeline_hunyuan_video import HunyuanVideoPipeline
|
32 |
from hyvideo.modules.models import HYVideoDiffusionTransformer
|
33 |
from hyvideo.vae.autoencoder_kl_causal_3d import AutoencoderKLCausal3D
|
34 |
+
import diffusers.pipelines
|
35 |
+
self.set_nested_attr(diffusers.pipelines, 'hyvideo.HunyuanVideoPipeline', HunyuanVideoPipeline)
|
36 |
+
self.set_nested_attr(diffusers.pipelines, 'hyvideo.HYVideoDiffusionTransformer', HYVideoDiffusionTransformer)
|
37 |
+
self.set_nested_attr(diffusers.pipelines, 'hyvideo.AutoencoderKLCausal3D', AutoencoderKLCausal3D)
|
38 |
+
|
39 |
+
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
40 |
|
41 |
pipe = HunyuanVideoPipeline.from_pretrained(
|
42 |
+
"magespace/hyvideo-diffusers",
|
43 |
+
torch_dtype=torch.bfloat16
|
44 |
+
).to("cuda")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
pipe.vae.enable_tiling()
|
46 |
```
|
47 |
|