EmptySD3LatentImage
The EmptySD3LatentImage node is a vital starting point for Stable Diffusion 3 (SD3) workflows in ComfyUI, initializing a blank latent image tensor in the SD3 latent format. This node helps ensure compatibility and provides a controlled, uniform base for prompt-driven art generation and testing.
Overview
EmptySD3LatentImage generates an empty (uniform value or zeros) latent tensor tailored to the SD3 model’s requirements. It is commonly used to kickstart image synthesis workflows where a base latent space is needed, especially for testing, reproducibility, or workflows that do not depend on a real input image. It interacts mainly as the source for sampler, decoder, and image transformation nodes downstream.
Visual Example
Official Documentation Link
https://comfyui.dev/docs/guides/Nodes/emptysd3latentimage/
Inputs
| Parameter | Data Type | Input Method | Default |
|---|---|---|---|
| width | Integer | Direct input or slider | 1024 |
| height | Integer | Direct input or slider | 1024 |
| batch_size | Integer | Direct input | 1 |
Outputs
| Output Name | Data Type | Description |
|---|---|---|
| LATENT | Tensor/Dict | Generated empty SD3-compatible latent tensor (16-channel, filled with constant or zeros, batchable) |
Usage Instructions
- Add EmptySD3LatentImage from the node browser to your workspace.
- Set
widthandheight(multiples of 64, typically 1024). - Set
batch_sizeas needed (default 1 for single image). - Connect LATENT output to a
KSamplerorDecodeSD3node. - Run the workflow. The node will produce an empty latent starting point for image generation.
Advanced Usage
- Batch generate latent images for parallel processing by increasing
batch_size. - Experiment with aspect ratios for special effects or dataset matching.
- Use with SD3-specific samplers for best results, ensuring dimensions are multiples of 64.
- Combine with conditioning nodes for guided generation.
Example JSON for API or Workflow Export
{
"id": "empty_sd3_latent_1",
"type": "EmptySD3LatentImage",
"inputs": {
"width": 1024,
"height": 1024,
"batch_size": 2
}
}
Tips
- Always use image dimensions that are multiples of 64 for SD3 compatibility.
- Larger batch sizes save time when initializing multiple workflows, but increase memory usage.
- Troubleshooting generation issues? Ensure latent size matches model requirements.
How It Works (Technical)
The node constructs a latent image tensor (multi-dimensional array) of shape [batch_size, channels, height, width],
filled with a constant (e.g., 0.0609) or zeros. The output matches the SD3 format (usually 16 channels).
This tensor is passed downstream, where samplers or decoders use it as a canvas for generative operations.
Github Alternatives
- Bobs Latent Optimizer for ComfyUI – custom nodes to generate optimized empty latent images for SD3 and other models, with automatic aspect ratio and dimension calculation.
- liusida/ComfyUI-SD3-nodes – SD3-compatible nodes for ComfyUI including wrappers and improved usability for SD3 latent image tasks.
- ComfyUI Hunyuan Latent Nodes – alternative latent generation nodes compatible with SD3, FLUX, Qwen and Hunyuan models, offering dimension auto-adjust and video support.
Videcool workflows
The EmptySD3LatentImage node is used in the following Videcool workflows:
FAQ
A1: It is tailored for SD3 latent format; other models may require their own format.
A2: This ensures compatibility with SD3 downsampling and upsampling layers.
A3: The latent tensor is initialized with zeros or a small constant, providing a uniform starting point for generation.
Common Mistakes and Troubleshooting
- Non-multiple-of-64 dimensions; will cause errors or unexpected behavior—always check!
- Setting
batch_sizetoo high can exceed system memory/VRAM. - Using the node outside SD3 pipelines may result in incompatible latent format.
- For blurry or non-diverse outputs, verify the sampler and prompt interactions downstream.
Conclusion
The EmptySD3LatentImage node is a foundation for SD3 image generation in ComfyUI, enabling reproducibility, testing, and creative control. Its reliable initialization of the SD3 latent space allows users to build complex workflows with clarity and precision.