Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-HunyuanImage3 > HunyuanImage 3.0 Empty Latent

ComfyUI Node: HunyuanImage 3.0 Empty Latent

Class Name

HunyuanImage3EmptyLatent

Category
latent/hunyuan image 3
Author
PedroMarinhoDev (Account age: 43days)
Extension
ComfyUI-HunyuanImage3
Latest Updated
2026-11-03
Github Stars
0.04K

How to Install ComfyUI-HunyuanImage3

Install this extension via the ComfyUI Manager by searching for ComfyUI-HunyuanImage3
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-HunyuanImage3 in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

HunyuanImage 3.0 Empty Latent Description

Creates zero-filled latents in HunyuanImage 3.0 format for image generation from scratch.

HunyuanImage 3.0 Empty Latent:

HunyuanImage3EmptyLatent creates a blank latent starting point for HunyuanImage 3.0 image-generation workflows. A latent is a compact working representation that an image model develops into visual content before a compatible VAE converts it into a viewable image. This node fills that starting representation with zeros rather than encoding an existing picture or generating random noise itself, allowing the sampling stage to handle the generation process. It uses the HunyuanImage 3.0 latent format and keeps the values in unscaled VAE space, leaving model-specific scaling to the sampler. This provides a correctly structured foundation for generating images from scratch without requiring a source image. It is format-specific and should not be treated as interchangeable with other Hunyuan image or video latent generators.

HunyuanImage 3.0 Empty Latent Input Parameters:

width

Sets the intended image width in pixels and determines the horizontal size of the blank latent. The minimum is 16, the maximum is 16384, and the adjustment step is 16. The default is the source-code constant BASE_SIZE; its numerical value is not included in the supplied context. HunyuanImage 3.0 uses a spatial reduction factor of 16, so the latent width is calculated as width // 16; for example, a width of 1024 produces 64 latent positions horizontally. Increasing this value gives the generation process a wider canvas but also increases memory requirements and subsequent sampling work. Use multiples of 16: the calculation uses integer division, so a nonmultiple supplied outside the normal interface would be rounded down at the latent level. The allowed range describes what this node accepts, not a guarantee that every size is practical for your hardware or model workflow.

height

Sets the intended image height in pixels and determines the vertical size of the blank latent. The minimum is 16, the maximum is 16384, and the adjustment step is 16. The default is BASE_SIZE, whose numerical value is not provided in the supplied source excerpts. The latent height is calculated as height // 16; for example, a height of 1024 becomes 64 latent positions vertically. Together with width, this controls the canvas proportions: equal values create a square canvas, a larger height creates a portrait canvas, and a larger width creates a landscape canvas. Increasing height increases memory requirements and sampling workload. Choose multiples of 16 to match the format’s spatial reduction and avoid dimensions being truncated by integer division.

batch_size

Controls how many blank latent samples are created together. The minimum is 1, the maximum is 64, and the default is 1. A value of 1 prepares a starting latent for one image, while a value of 4 prepares four starting samples with the same dimensions. All samples are initially zero-filled; this node does not assign seeds or make the samples visually different. Any variation is introduced later through the sampling workflow. Larger batches increase the size of the allocated tensor in direct proportion to the batch count and generally require more memory during downstream generation. Start with 1 when testing a workflow or working at high resolution, then increase it if your available memory permits.

HunyuanImage 3.0 Empty Latent Output Parameters:

LATENT

Provides a ComfyUI LATENT containing the zero-filled tensor under the samples key. This is a starting representation, not a finished image or a randomly generated noise tensor. The tensor uses 32-bit floating-point values and has the shape (batch_size, 32, LATENT_T, height // 16, width // 16). These dimensions represent the batch count, the format’s 32 latent channels, a temporal-axis size defined by LATENT_T, and the compressed height and width. The numerical value of LATENT_T is not included in the supplied context. Although this is an image node, its latent format includes a temporal axis, so it is not shaped like a conventional four-dimensional image latent. The values remain in unscaled VAE space; the compatible model’s latent-format processing applies scaling at the sampler boundary. Connect this output to the latent input of a compatible HunyuanImage 3.0 sampling workflow, then decode the sampled result with the appropriate VAE.

HunyuanImage 3.0 Empty Latent Usage Tips:

  • Use this node with a HunyuanImage 3.0 model and its compatible VAE. The similarly named Empty Hunyuan Image Latent node shown in the context uses 64 channels and spatial reduction by 32, so it is not a direct substitute.

  • Start with batch_size set to 1 and moderate dimensions, such as 1024 × 1024, to check workflow compatibility before increasing resource usage. This is an example configuration, not a documented optimal resolution.

  • Keep both dimensions divisible by 16. For example, 1024 × 1536 prepares a portrait canvas, while 1536 × 1024 prepares a landscape canvas.

  • Reduce width and height together when troubleshooting memory pressure. Halving both dimensions reduces the number of spatial latent positions to one quarter, although total workflow memory also depends on the model and sampler.

  • Treat the maximum dimensions and batch size as interface limits, not performance recommendations. Combining very large dimensions with a large batch can require substantial memory even before sampling begins.

  • Let the compatible sampler handle latent scaling. This node intentionally produces unscaled values; manually applying the model’s scale factor can make later scaling or decoding inconsistent.

  • For image generation, pass the blank latent through sampling before decoding. Decoding the zero-filled starting latent directly does not produce a prompt-generated image.

HunyuanImage 3.0 Empty Latent Common Errors and Solutions:

Input validation failure: value outside the allowed range

  • Explanation: Width and height must each be between 16 and 16384, and batch_size must be between 1 and 64. ComfyUI may reject values outside those ranges before execution; the exact validation message depends on your version.
  • Solution: Restore values within the documented limits and use multiples of 16 for width and height. Try batch_size 1 while checking the workflow.

Memory allocation failure during latent creation

  • Explanation: Creating the zero-filled tensor can exhaust available memory when dimensions or batch size are too large. A possible PyTorch message includes DefaultCPUAllocator: can't allocate memory; exact wording depends on the runtime. The node does not explicitly select a device for allocation.
  • Solution: Lower batch_size first, then reduce width and height. Close memory-heavy applications if needed, and avoid assuming that a permitted maximum value will fit your system.

CUDA out of memory during downstream sampling

  • Explanation: The empty latent may be created successfully, but processing it with the model can exceed available GPU memory. This is a downstream resource failure rather than an explicit error raised by this node.
  • Solution: Set batch_size to 1 and reduce the image dimensions. If your ComfyUI setup supports memory-saving or model-offloading options, use them before retrying.

Tensor shape or channel mismatch in a downstream node

  • Explanation: Errors mentioning incompatible tensor sizes, dimensions, or expected channels can occur when this five-dimensional, 32-channel latent is connected to a model, VAE, or processing node that expects a different format. The exact message depends on the receiving component.
  • Solution: Check that the model and VAE are compatible with HunyuanImage 3.0 and that any intermediate latent-processing nodes support its format. Do not substitute another Hunyuan latent generator solely because its name is similar.

Missing required input: width, height, or batch_size

  • Explanation: All three parameters are required by the interface, and the execution method supplies no fallback arguments. Incomplete API requests or direct calls can therefore fail validation or report missing positional arguments.
  • Solution: Supply width, height, and batch_size explicitly in API-driven workflows. In the graphical interface, check that all three settings are present and valid.

HunyuanImage 3.0 Empty Latent Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-HunyuanImage3
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

HunyuanImage 3.0 Empty Latent