Model Mismatch

Black or NaN image output (VAE)

Black or NaN image output (no exception) — often a VAE precision issue

Generation finishes with no error but produces a black or garbled image. This is usually VAE numerical instability in half precision, not a broken prompt.

What it means

The pipeline ran to completion but the decoded image is black, purple, or full of NaNs. There is no exception because nothing crashed — the numbers simply went out of range during VAE decoding, so the pixels are invalid. Some VAEs (notably certain SDXL VAEs) are numerically unstable in fp16 half precision.

Because it is a precision/compatibility issue rather than a logic error, the fix is to decode the VAE in a more stable precision or to use a VAE matched to the model.

Common causes

  • A VAE that is unstable in fp16 being run in half precision.
  • A VAE that does not match the checkpoint’s architecture.
  • Half-precision VAE flags on a GPU/VAE combination that produces NaNs.
  • A corrupted or wrong VAE file.

How to fix it

  1. 1

    Decode the VAE in full precision

    Restart ComfyUI with a full-precision VAE option (for example --fp32-vae / --no-half-vae) so decoding is numerically stable.

  2. 2

    Use a VAE matched to the model

    Load the VAE that belongs to your checkpoint’s architecture, or a known-stable fixed VAE for that family.

  3. 3

    Update ComfyUI

    Precision handling for known-unstable VAEs improves over time; update to a recent build.

  4. 4

    Test with a known-good VAE

    Swap in a VAE you know works for that architecture to confirm the original VAE file (or its precision) was the cause.

Keeping the VAE and its precision settings recorded with each good result means a black-image regression is a quick diff against a known-working configuration, not a fresh investigation.

Frequently asked questions

Frequently Asked Questions

Quick answers to the most common questions.

Related errors

Make every ComfyUI run reproducible

Numonic captures the full workflow behind each ComfyUI generation — models, samplers, seeds, prompts, and custom nodes — so a setup that finally works is one you can find and rebuild, not re-debug.