Nodes/Comfy_HunyuanImage3/Hunyuan Empty Latent
ComfyUI Node

Hunyuan Empty Latent

A noise tensor factory for the experimental latent nodes

By EricRollei·Created 10 months ago·Updated 4 months ago· 65
Hunyuan Empty Latent
    • latent
    resolution1024x1024 (1:1 Square)
    seed0
    batch_size1

    "Hunyuan Empty Latent" is a tiny utility node that creates a random noise tensor in the exact shape the HunyuanImage-3.0 pipeline expects, at a resolution and seed you choose. That's the whole job. It's the seed stock for the pack's experimental latent-control workflow: you generate a noise tensor here, optionally shape it with Hunyuan Latent Noise Shaping, and feed it into Hunyuan Generate with Latent as the custom noise source instead of letting the generator roll its own random noise.

    The output shape is (batch, 32, H/16, W/16) in bfloat16 - the VAE downsamples by 16× in each spatial dimension, which is why a 1024×1024 image maps to a 64×64 latent. The node's own docstring spells out the design goal: feed it the same seed and resolution you'd use in the standard generator, and the generation should come out identical, proving the pipeline actually consumed your latent.

    The three inputs

    • resolution - 40 presets, same photo-ratio list as the V2 nodes. "Auto" isn't supported and falls back to 1024×1024 with a warning, so pick a real preset.
    • seed - the RNG seed for the noise. Same seed + same resolution = same noise tensor, which is what makes a reproducible custom latent workflow possible.
    • batch_size - 1 to 8, how many latent tensors to produce.

    Output is a single latent of type HUNYUAN_LATENT. It only plugs into the pack's own latent-aware nodes - there's no cross-compatibility with ComfyUI's standard LATENT type, and no reason to expect any; this is a pack-specific experiment.

    Where it sits

    Hunyuan Empty Latent → (Hunyuan Latent Noise Shaping) → Hunyuan Generate with Latent → Save Image
    

    With no image connected to Generate with Latent, the latent here is the pure custom-noise path. Add an image and you get image-guided generation on top of your noise base.

    Installing

    cd ComfyUI/custom_nodes
    git clone https://github.com/EricRollei/Comfy_HunyuanImage3
    cd Comfy_HunyuanImage3
    pip install -r requirements.txt
    

    Restart ComfyUI, or install via ComfyUI Manager (search "Comfy_HunyuanImage3"). No model is required just to run this node - but the generate node it feeds will need a base model in ComfyUI/models/.

    The honest read

    This is a niche node for a niche feature, and the pack is upfront about the whole latent-control subsystem being experimental. If you're not doing composition-control or custom-noise experiments, you will never touch it - the standard generators handle their own noise internally. When you do want it, the reproducibility trick (same seed → same latent → identical output to the normal path) is a nice self-test that the feature isn't silently being ignored. Just don't expect it to behave like a diffusion latent: it's noise for an autoregressive pipeline, and the semantics are still being figured out.

    CategoryEric/HunyuanImage3/Latent

    Inputs (3)

    NameTypeDefaultDescription
    resolutionCOMBO1024x1024 (1:1 Square)40 options: Auto (model predicts), 768x1360 (9:16 Portrait), 832x1248 (2:3 Portrait), 864x1216 (5:7 Portrait), 880x1184 (3:4 Portrait), 912x1152 (4:5 Portrait), +34
    seedINT00–9223372036854776000
    batch_sizeINT11–8

    Outputs (1)

    NameTypeDescription
    latentHUNYUAN_LATENT