Spaces:
Runtime error
Runtime error
Download hyvideo/modules/__init__.py from ItsMeBell/HunyuanVideo: direct link, hf CLI and curl.
- Browser
- Download file 771 Bytes
-
https://huggingface.co/spaces/ItsMeBell/HunyuanVideo/resolve/main/hyvideo/modules/__init__.py
- Command line
-
hf download hf://spaces/ItsMeBell/HunyuanVideo/hyvideo/modules/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/ItsMeBell/HunyuanVideo/resolve/main/hyvideo/modules/__init__.py
771 Bytes
| from .models import HYVideoDiffusionTransformer, HUNYUAN_VIDEO_CONFIG | |
| def load_model(args, in_channels, out_channels, factor_kwargs): | |
| """load hunyuan video model | |
| Args: | |
| args (dict): model args | |
| in_channels (int): input channels number | |
| out_channels (int): output channels number | |
| factor_kwargs (dict): factor kwargs | |
| Returns: | |
| model (nn.Module): The hunyuan video model | |
| """ | |
| if args.model in HUNYUAN_VIDEO_CONFIG.keys(): | |
| model = HYVideoDiffusionTransformer( | |
| args, | |
| in_channels=in_channels, | |
| out_channels=out_channels, | |
| **HUNYUAN_VIDEO_CONFIG[args.model], | |
| **factor_kwargs, | |
| ) | |
| return model | |
| else: | |
| raise NotImplementedError() | |