EmptyHunyuanLatentForImage
An empty latent for Hunyuan that's secretly 'one frame of video'
- LATENT
Here's the thing that makes this node weirder than it looks: it's an "image" latent node that doesn't output a standard image latent. Standard EmptyLatentImage gives you a 3D tensor, [B, 4, H/8, W/8] - the shape every SD-era VAE expects. This one outputs [batch_size, 4, 1, height // 8, width // 8], a 5D tensor with a 1-frame time axis. The comment in the source says it outright: "maintaining video compatibility with single frame."
Why does that matter? Because the Hunyuan family's VAE is a 3D causal video VAE, not an SD-style image VAE. If you're running Hunyuan Video for image-to-video and want a clean empty start frame, or you're on a Hunyuan-derived image pipeline, feeding it an SD-shaped latent is a shape mismatch waiting to happen. This node makes a zero-filled latent in the shape Hunyuan's VAE actually speaks - one static frame, ready to be denoised by the sampler and decoded by the video VAE. Same idea as its sibling EmptyHunyuanLatentForVideo, just without the time dimension to tune.
Let me be blunt about scope: this is a thin utility, and for 99% of image generation you should ignore it. If your workflow is SDXL, Flux, or anything that isn't Hunyuan, a plain EmptyLatentImage is what you want - this node's 5D output buys you nothing there. Reach for it specifically when Hunyuan is in the graph and you want a text-to-image-style start that stays compatible with its video VAE.
The inputs
Just two, which is the whole appeal:
- resolution - the same 42-entry dropdown as the video node, from
256x256 (1:1)to1728x576 (3:1), all multiples of 16 so you can't produce an off-grid latent. Pick a preset, done. - batch_size - default 1, max 4096. Bump it if you genuinely want N images at once; otherwise leave it.
The output is a LATENT that feeds the sampler, then VAE decode → Save Image (or on to an I2V model as your start frame). Note the image latent is still only 4 channels - it's the video VAE's temporal format it matches, not its 16-channel depth.
Installing it
Same story as its sibling, because they ship in one tiny pack: install via ComfyUI Manager (search "EmptyHunyuanLatent") or
cd ComfyUI/custom_nodes
git clone https://github.com/ShmuelRonen/ComfyUI-EmptyHunyuanLatent
then restart ComfyUI. The node appears under latent. It has zero dependencies beyond ComfyUI and torch - no downloads, no models, no keys. The README's clone URL is stale (it names the pack's old repo, ComfyUI-Hunyuan-Latent), so use the one above.
Gotchas
Don't take the README's output format at face value: it documents the same [B, 4, frames, H/8, W/8] shape for both nodes, but the code is what ships, and the code gives the image node a 5D single-frame latent. If you're also running the video node, note the channel counts differ there too (16 channels, not 4) - the two are not interchangeable.
And one expectation to set: this node doesn't change how much VRAM Hunyuan wants. The empty latent is trivially cheap; the 13B / 8.3B model attached to it is not. Keep the resolution dropdown honest for your card and you'll be fine. It's a one-trick node, but when the trick is "the sampler accepts my latent at all," it's a good one to have bookmarked.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution | COMBO | 42 options: 256x256 (1:1), 256x384 (2:3), 384x256 (3:2), 320x448 (5:7), 448x320 (7:5), 384x512 (3:4), +36 | |
| batch_size | INT | 11–4096 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |