Update README.md
Browse files
README.md
CHANGED
@@ -33,6 +33,16 @@ from hyvideo.diffusion.pipelines.pipeline_hunyuan_video import HunyuanVideoPipel
|
|
33 |
from hyvideo.modules.models import HYVideoDiffusionTransformer
|
34 |
from hyvideo.vae.autoencoder_kl_causal_3d import AutoencoderKLCausal3D
|
35 |
import diffusers.pipelines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
self.set_nested_attr(diffusers.pipelines, 'hyvideo.HunyuanVideoPipeline', HunyuanVideoPipeline)
|
37 |
self.set_nested_attr(diffusers.pipelines, 'hyvideo.HYVideoDiffusionTransformer', HYVideoDiffusionTransformer)
|
38 |
self.set_nested_attr(diffusers.pipelines, 'hyvideo.AutoencoderKLCausal3D', AutoencoderKLCausal3D)
|
|
|
33 |
from hyvideo.modules.models import HYVideoDiffusionTransformer
|
34 |
from hyvideo.vae.autoencoder_kl_causal_3d import AutoencoderKLCausal3D
|
35 |
import diffusers.pipelines
|
36 |
+
|
37 |
+
from types import ModuleType
|
38 |
+
def set_nested_attr(current, path, value):
|
39 |
+
parts = path.split('.')
|
40 |
+
for part in parts[:-1]:
|
41 |
+
if not hasattr(current, part):
|
42 |
+
setattr(current, part, ModuleType(part))
|
43 |
+
current = getattr(current, part)
|
44 |
+
setattr(current, parts[-1], value)
|
45 |
+
|
46 |
self.set_nested_attr(diffusers.pipelines, 'hyvideo.HunyuanVideoPipeline', HunyuanVideoPipeline)
|
47 |
self.set_nested_attr(diffusers.pipelines, 'hyvideo.HYVideoDiffusionTransformer', HYVideoDiffusionTransformer)
|
48 |
self.set_nested_attr(diffusers.pipelines, 'hyvideo.AutoencoderKLCausal3D', AutoencoderKLCausal3D)
|