Nodes/HALO Debug Pack/HALO Latent Debug
ComfyUI Node

HALO Latent Debug

The sampler's report card — check the latent before you blame the VAE

By bkpaine1·Created 7 months ago·Updated 7 months ago· 3
HALO Latent Debug
  • samples
  • LATENT

The classic black-image mystery on AMD ROCm goes like this: the sampler runs, the VAE decodes, and out comes a black rectangle with no warning. Everyone blames the VAE. HALO Latent Debug exists to settle the argument before you waste an evening - it sits between the sampler and the VAE and tells you whether the numbers leaving the diffusion model are even valid in the first place.

A latent is the compressed representation the diffusion model works in: 16 channels at a fraction of the image resolution (the exact size depends on the model's VAE, from 4 channels on SDXL up to 16 on Flux-era models). You never see it as an image. This node makes the invisible visible by dumping its statistics to the console.

How it works

The node reads the samples["samples"] tensor and prints the essentials - dtype, shape, device, min, max, mean, std - then runs three checks:

  • NaN → counts them, prints Model is producing garbage - precision issue.
  • Inf → same treatment
  • "Dead" latent (absolute max below 0.001, i.e. all zeros) → prints LATENT IS DEAD! and points upstream: This is NOT a VAE problem. TRY: --force-fp32 flag or different model

That last distinction is the whole point of the node. A dead or NaN latent means the diffusion model itself is producing garbage - usually bf16 precision going wrong on ROCm hardware. No VAE, no matter how clever, can decode garbage into a picture.

Inputs and outputs

  • samples (LATENT, required) - wire this from your sampler's LATENT output.
  • Output: LATENT, passed through unchanged.

Drop it in as Sampler → HALO Latent Debug → VAE Decode. Because it's a pass-through, your image comes out bit-for-bit identical to before.

Installation

It ships in the HALO Debug Pack, alongside four siblings. ComfyUI Manager → search "HALO Debug Pack", or:

cd ComfyUI/custom_nodes
git clone https://github.com/bkpaine1/halo_pack

Restart ComfyUI and the nodes appear under the HALO category. No extra dependencies, no model downloads - the pack is a single file.

Where people get burned

  • The report goes to your terminal, not the ComfyUI window. If you started ComfyUI from a launcher that hides the console, you'll see nothing and think the node is broken. Check the log output where you launched it.
  • A "valid" latent means the VAE really is the problem. If this node says everything looks healthy but your image is still black, you're in the exact case the pack's FP32 VAE nodes were built for - swap in HALO VAE Decode (FP32) and see if it clears.
  • Don't permanently wire it in. It prints every run, and there's no mute switch. Use it to diagnose, then delete it.

It's a boring node in the best way: two inputs-worth of work, zero ambiguity about the answer. When your image dies between sampler and screen, this is where you find out who's actually at fault.

CategoryHALO

Inputs (1)

NameTypeDefaultDescription
samplesLATENT

Outputs (1)

NameTypeDescription
LATENTLATENT