Custom nodes for ComfyUI to generate empty latent space compatible with Hunyuan models for both image and video generation.
Custom nodes for ComfyUI to generate empty latent space compatible with Hunyuan models for both image and video generation.
For video
For Images
Creates an empty latent space for image generation with the following parameters:
Creates an empty latent space for video generation with the following parameters:
The nodes support various standard resolutions with their aspect ratios:
Install from ComfyUI Manager
or
cd ComfyUI/custom_nodes
Clone this repository:
git clone https://github.com/ShmuelRonen/ComfyUI-Hunyuan-Latent.git
Restart ComfyUI
The nodes will appear in the node menu under:
latent
for EmptyHunyuanLatentForImagelatent/video
for EmptyHunyuanLatentForVideolatent → EmptyHunyuanLatentForImage
for image generationlatent/video → EmptyHunyuanLatentForVideo
for video generationBoth nodes output a latent dictionary with the key "samples" containing a torch tensor with the following dimensions:
[batch_size, 4, 1, height//8, width//8]
[batch_size, 4, frames, height//8, width//8]
https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged/tree/main/split_files/text_encoders
https://drive.google.com/file/d/1BvGHjR4Mb60ZPx9tqzA1AabAwZc47ctx/view?usp=sharing
MIT
Contributions are welcome! Please feel free to submit a Pull Request.