ComfyUI Produces a Black Image with No Error? VAE Precision, NaN & VAE File Diagnosis Guide

2026-11-24 | GPU Repair | 31 minutes | HK GPU Fix Editorial Team

ComfyUI Produces a Black Image with No Error? VAE Precision, NaN & VAE File Diagnosis Guide

Key takeaway

When ComfyUI finishes a workflow with no error but saves a black image, the fault is usually a number overflowing to NaN during VAE decoding, or the wrong VAE file. Four comparisons — the fp32 VAE flag, preview timing, the VAE file, and forced fp32 on GTX 16-series cards — separate the precision layer from the file layer.

Introduction

The queue completes. The progress bar fills, the node graph goes green, and the Save Image node writes a valid PNG file. Then the image is opened, and it is 100% black — `#000000`, from edge to edge, with nothing in it at all. There is no error message, no traceback, and no crash. The workflow ran to completion and produced nothing.

That combination — a finished workflow, a valid file, and a completely black picture — has a specific shape, and it points in a specific direction. The model is probably not broken, because a broken model usually reports an error. The prompt is almost certainly not the problem, because a bad prompt produces a bad picture, not a pure black one. What failed is a number: somewhere between the latent and the pixels, a value overflowed, became NaN (not a number), and NaN became black.

The image pipeline has two stages, and the black image can come from either one. First the sampler works in latent space, step by step, removing noise. Then the VAE decoder turns that latent into RGB pixels. If the numbers overflow during sampling, the preview is black from the first step. If they overflow during VAE decoding, the preview looks normal while sampling runs, and only the final image turns black. Which moment the picture turns black is the single most useful observation in the whole diagnosis, and it costs nothing — it only needs watching.

This guide explains how those two stages work, how to prove which one produced the black image, and how to avoid the mistakes that make the diagnosis look confusing. It is a diagnostic guide for one narrow shape: ComfyUI finishing a workflow with no error and saving a solid black image. If the run ends with a CUDA out of memory error, if the output is grey or brown rather than pure black, or if the screen itself is black, different articles apply, and the boundary section near the end says which ones.

Symptom definition: what counts as this problem

This article covers one narrow shape. All three of the following must be true; if any one is missing, the problem belongs somewhere else.

First, ComfyUI runs a workflow to completion — the queue finishes, the progress bar fills, the node graph goes green — and the Save Image node writes a valid PNG that is 100% pure black (`#000000`). The localaimaster guide states the shape directly: "The queue completes, the progress bar fills, the node graph goes green, and the SaveImage node writes a valid PNG that happens to be 100% #000000."

Second, there is no error message of any kind: no traceback, no error popup, no `CUDA out of memory`, no `mat1 and mat2 shapes cannot be multiplied`. The freakyjolly guide states it plainly: "The workflow finishes and there is no error, but the Save Image node shows a solid black square." The absence of an error is itself a diagnostic clue — an out-of-memory failure reports itself, while a NaN failure does not.

Third, the same prompt and the same checkpoint can produce a normal image after a setting is changed or a different VAE is loaded. That proves the model itself is not broken and the prompt is not the problem; the fault sits in the numeric precision layer or in the VAE file layer.

These three shapes need to be kept apart because each one is measured differently. A run that ends with `CUDA out of memory` during VAE decoding is the out-of-memory route — it has an error, a stage timing, and a tiled-VAE remedy. A grey or brown output is the wrong-VAE route, not a NaN route. A training run that runs out of memory halfway through is the LoRA training pool route in article #564. This article is about the remaining shape: a silent black image, where the numbers went out of range and nobody was told.

Five layers of mechanism

An image goes from latent to pixels through the VAE decoder, and the black image is what happens when a number in that journey overflows. Three independent sources — freakyjolly, localaimaster, and numonic — agree on the mechanism, and the details below come from the sources listed at the end of this article.

Layer one: the VAE decode precision layer — fp16 overflow becomes NaN. This is a main subject of this article. Half precision (fp16) has a 10-bit mantissa and a maximum value of about 65,504. Some VAEs — most famously the SDXL one — produce intermediate values during fp16 decoding that exceed that ceiling, and the result becomes NaN (not a number). The freakyjolly guide states it directly: "In nearly every case, a number inside the model overflowed and became NaN (not a number). ComfyUI cannot turn NaN into a colour, so it saves black." Its cause table lists the SDXL case first: "SDXL, preview fine, final image black | SDXL VAE overflows in fp16 | sdxl_vae_fp16_fix or `--fp32-vae`". The evidence for this layer is test T1. Across the whole article library, "fp32-vae" appears zero times in either language, and "fp16" appears in Chinese only in articles #179, #453, and #561 (case-insensitive matching) — #179 and #561 in quantisation-planning or faster-whisper precision contexts, #453 in DirectX HDR backbuffer rendering — never in ComfyUI VAE decoding.

Layer two: the VAE file layer — wrong family, damaged, or empty VAE. This is a main subject of this article. A VAE file can belong to the wrong checkpoint family (SD 1.5, SDXL, and Flux each have different VAEs), or it can be damaged by an incomplete download, or it can be 0 bytes. The evidence for this layer is test T3, and the key distinction is colour: a wrong VAE usually produces a grey or brown image, not a pure black one. The localaimaster guide states the split plainly: "Grey or brown output is a different bug entirely — that is the wrong VAE, not a NaN." So test T3 does two jobs at once — it separates the file layer from the precision layer, and it separates grey and brown from black. Across the whole article library, "VAE" appears in either language only in articles #179 and #564 — #179 counts how much memory a VAE decoder takes before purchase, #564 is about a training run running out of memory — and neither one discusses a VAE file producing a black image during inference.

Layer three: the model and sampler precision layer — the preview is black from the first step. This is a main subject of this article. When the fault is not in VAE decoding but in the model itself or the sampler — an fp16-unstable new model, an acceleration option such as SageAttention, `--fast`, or `--force-fp16`, or a CFG value pushed to an extreme — the preview is black from the very first sampling step. The freakyjolly guide states the distinction: "The preview is black from the first step. The problem is in the model or sampler (precision, flags, CFG)." The evidence for this layer is test T2, the preview-timing test. Across the whole article library, "black image" appears only in article #126 (twice, in a Windows TDR/DirectX context, not ComfyUI), and the Chinese terms for a black image appear zero times in either language.

Layer four: the graphics-card precision capability layer — GTX 16-series cards do not handle fp16 reliably. This is a main subject of this article. GTX 1650 and 1660 cards run fp16 unreliably, so every model can come out black on them regardless of which checkpoint or VAE is used. The freakyjolly guide states it directly: "GTX 16-series (1650/1660): launch with `--force-fp32`. These cards do not handle fp16 reliably." The evidence for this layer is test T4. Across the whole article library, "force-fp32" appears zero times in either language.

Layer five: the prompt, LoRA, and CFG layer — a boundary, not a main subject. A badly written prompt does not turn a whole image pure black. A wrong-family LoRA or an extreme CFG can push values past the limit, but they only trigger layer one or layer three — they are not an independent layer of their own. This article states the point plainly so the reader does not waste time on it: do not try to fix a NaN by rewriting the prompt.

The mechanism leads to one key distinction: "black image" is not one cause, it is two questions — which stage produced the NaN, and which file is wrong. Preview timing (T2) answers the stage question, the precision flags (T1 and T4) answer the numeric layer question, and the VAE file comparison (T3) answers the file question.

How NaN becomes black

When ComfyUI saves or previews an image, it converts pixel values to 8-bit integers. NaN cannot be converted, so it is clipped to zero — and zero is black. The localaimaster guide states it in one line: "NaN clips to zero. Zero is black." The terminal warning that proves it is `RuntimeWarning: invalid value encountered in cast`. If that line appears in the terminal after a black image, the NaN is confirmed. If it does not appear, NaN is not excluded — the warning is printed only once and is easily buried under later queue messages.

ComfyUI itself admits the flag can cause this. The localaimaster guide quotes the official parameter description of the `--fp16-vae` flag: "Run the VAE in fp16, might cause black images." The official documentation says, in its own words, that this flag may produce black images.

Seven-step diagnosis

  1. Characterise the shape. Decide which kind of black it is: finished with no error and pure black (this article); an error message (the out-of-memory route); grey or brown (test T3, wrong VAE); the whole machine black or garbled (a display-output problem, not ComfyUI). Record the baseline: the checkpoint family (SD 1.5, SDXL, or Flux), the VAE file name, the graphics card model, and the launch flags.
  2. Read the terminal. Look for `RuntimeWarning: invalid value encountered in cast` (auxiliary observation). If it is there, NaN is confirmed — go to test T1. If it is not there, carry on; the warning is printed only once and may have been buried.
  3. Locate the moment with the preview. If the preview looks normal during sampling and only the final image is black (T2), the fault is in VAE decoding — go to tests T1 and T3. If the preview is black from the first step, the fault is in the model or sampler — go to the auxiliary observations (switch off acceleration options, lower CFG).
  4. Compare VAE decode precision. Run with `--fp32-vae`, or load `sdxl_vae_fp16_fix` (T1). If the image comes back normal, the VAE decode precision layer is the cause — keep the fp32 VAE or the fixed VAE as the long-term setting.
  5. Compare the VAE file. Load a VAE that is certainly from the right family (T3). If the image comes back normal, the VAE file layer is the cause — record which VAE belongs with which checkpoint.
  6. Compare the card's capability. On a GTX 16-series card only, run with `--force-fp32` (T4). If the image comes back normal, the card itself does not handle fp16 reliably — keep `--force-fp32` for that card, or change the card.
  7. Stop. If all four tests still do not separate the cause, record five things — the checkpoint, the VAE file name, the launch flags, the terminal warning line, and the moment the preview turned black — and bring those notes to a check. Do not reinstall ComfyUI or the driver one after another: reinstalling cannot change VAE precision.

Four decisive tests

Each test changes exactly one variable and watches whether the output is black or normal. Use the same workflow, the same checkpoint, the same prompt, and the same seed for every run, and judge by the colour of the output — not by whether the workflow finished, because it finishes either way.

T1: VAE decode precision flag comparison — the same checkpoint and prompt, default settings against `--fp32-vae` (or the `sdxl_vae_fp16_fix` VAE)

Run the same workflow twice. First with the default settings (the run that produces the black image), then with ComfyUI launched with `--fp32-vae` — or, equivalently, by adding a Load VAE node and loading `sdxl_vae_fp16_fix.safetensors`.

Why this test is new: "fp32-vae" appears zero times in either language across the whole article library. Article #564 discusses a VAE decoder, but its variable is the optimiser state offloaded during training and its outcome is "out of memory or completes" — a training memory question, not an inference colour question. The out-of-memory route's variable is the VAE decode stage timing plus tiled VAE, and its outcome is also "out of memory or completes". T1's outcome is a colour, not a memory error.

T2: Preview timing location — the preview normal during sampling and black only at the end (VAE decode) against black from the first step (model or sampler)

No setting needs to change for this test — only watching. Run the workflow and watch the Preview Image node. If the live preview during sampling looks normal and only the final image is black, the fault is in VAE decoding. If the preview is black from the first step, the fault is in the model or sampler.

Why this test is new: "black image" appears only in article #126 (twice, in a Windows TDR/DirectX context, not ComfyUI), and the Chinese terms for a black image appear zero times in either language across the whole article library. No neighbouring article teaches using the moment the preview turns black as a location test. Article #564 has a stage-timing test, but its variable is "which training stage runs out of memory" and its outcome is "out of memory or completes" — a training memory question. T2's object is an inference black image, not a training out-of-memory error.

T3: VAE file family comparison — the same checkpoint, the suspect VAE against a known matching VAE, watching whether the colour is pure black or grey and brown

Run the same checkpoint and prompt twice. First with the VAE suspected of being wrong, and record the colour — pure black, grey, or brown. Then with a VAE that is certainly from the right family: for SDXL, `sdxl_vae_fp16_fix.safetensors`; for Flux, `ae.safetensors` (verified by tutorial3d.it).

Why this test is new: "VAE" appears in either language only in articles #179 and #564. Article #179 counts how much memory a VAE decoder takes (a before-purchase planning calculation) and never discusses the VAE file family. Article #564 is about a VAE decoder coexisting with the AdamW optimiser state during training and running out of memory — never about an inference black image. T3's variable is "which VAE file is used" and its outcome is "the output colour" — no neighbouring article has that variable combination.

T4: GTX 16-series forced fp32 comparison — the same workflow, default settings against `--force-fp32`

This test applies only to GTX 1650 and 1660 cards. Run the same workflow, the same checkpoint, and the same prompt twice: first with the default launch, then with ComfyUI launched with `--force-fp32`.

Why this test is new: "force-fp32" appears zero times in either language across the whole article library. No neighbouring article discusses GTX 16-series fp16 instability. Article #179 discusses quantisation levels before buying a card, not which card cannot run fp16 reliably. Article #561 discusses faster-whisper `compute_type` steps, not a graphics-card family's precision capability. T4's variable is "whether the whole pipeline is forced to fp32" and its outcome is "black image or normal image" — no neighbouring article has that variable.

Auxiliary observations

These are useful supporting observations. They are deliberately not counted among the four decisive tests.

The terminal warning line. After a black image, check the terminal (or the ComfyUI Desktop console) for `RuntimeWarning: invalid value encountered in cast`. If it is there, it is proof of NaN — go to T1. It is deliberately not counted among the four tests: it is only a confirmation message, not a controlled comparison, and the warning is printed only once and is easily buried under later queue messages.

The LoRA on-off comparison. If the black image appears only when a particular LoRA is used and the image is normal without it, that LoRA is faulty (wrong family, damaged, or set too strong). It is deliberately not counted among the four tests: it is only one concrete form of T3's variable (swapping out one component), not an independent variable.

The CFG and acceleration-option comparison. If the black image only appears after SageAttention, `--fast`, or `--force-fp16` is switched on, or after CFG is pushed to an extreme, switch that option off or lower the CFG and try again. It is deliberately not counted among the four tests: it is only a trigger condition of layer three, not an independent location test.

The two-node VAE-bypass test. The localaimaster guide mentions a two-node test (bypassing the VAE to see whether the latent itself contains NaN), which can prove whether the NaN sits before or after the VAE. It is deliberately not counted among the four tests: it is another way of writing the same location question that T2 already answers by watching the preview timing, and the reader does not need to modify the workflow.

The four tests, in one table

TestVariable changedOutcome variableWhat a positive result means
T1: default vs `--fp32-vae` (or `sdxl_vae_fp16_fix`)VAE decode precision flagBlack image vs normal imageVAE decode precision layer is the cause
T2: preview timingMoment the preview turns blackVAE decode vs model/sampler locationLocates the fault in VAE decoding or in the model/sampler
T3: suspect VAE vs matching VAEWhich VAE file is loadedOutput colour (pure black / grey / brown / normal)VAE file layer is the cause; grey/brown means wrong VAE
T4: default vs `--force-fp32` (GTX 16-series only)Whole pipeline forced to fp32Black image vs normal imageCard does not handle fp16 reliably
Auxiliary: terminal warning line—`RuntimeWarning: invalid value encountered in cast` present or notNaN confirmed if present; absence does not exclude NaN
Auxiliary: LoRA on vs offWhether the LoRA is loadedBlack image vs normal imageThat LoRA is faulty
Auxiliary: acceleration options / CFGSageAttention, `--fast`, `--force-fp16`, CFGBlack image vs normal imageTrigger condition of the model/sampler layer

Common misconceptions

  1. "A black image means the prompt is wrong or the model is broken." Wrong. A prompt cannot turn a whole image pure black, and a broken model usually reports an error. A black image with no error is most commonly a number overflowing to NaN — check the terminal warning line first, then run T1.
  2. "No error means nothing is wrong — it must be a ComfyUI bug." Wrong. No error does not mean no fault: NaN never triggers an exception, it only quietly becomes black. The freakyjolly guide states that this problem is "almost never your prompt".
  3. "A grey image and a black image are the same problem." Wrong. Grey or brown output is a wrong VAE; a pure black image is NaN — localaimaster states the two separately. The fixes are different: a grey image needs the right-family VAE, a black image needs a precision-flag change.
  4. "Changing the checkpoint will fix it." Wrong. Changing the checkpoint may also change the VAE setting, which makes it look like the checkpoint was the problem — when the real cause was VAE precision or the VAE file. Run T1 and T3 first; do not guess by swapping checkpoints.
  5. "`--force-fp32-vae` is a real flag." Wrong. The tutorial3d.it guide warns explicitly that this flag does not exist. The correct flags are `--fp32-vae` (VAE decode only) or `--force-fp32` (the whole pipeline). A mistyped flag name produces no warning from ComfyUI — it simply has no effect.
  6. "Switching off SageAttention or `--fast` means it is fixed." Wrong. Switching off an acceleration option only removes the trigger condition; it does not prove which layer was the cause. The next model change may bring the black image back. Run T1 and T3 as well, so the VAE precision layer and the VAE file layer are actually separated.

Boundary cases: what this article is not

SituationWhich route appliesWhy it is not this article
ComfyUI runs out of memory during VAE decoding (with an error)Out-of-memory route (backup item FX3)It has an error and is a memory layer, not a silent black image
LoRA training runs out of memory halfway through#564Training pool layer, not inference VAE decoding
Training or inference out of memory (PyTorch allocator / vLLM budget)#552 / #553Memory layer — out of memory reports an error, it never quietly produces a black image
Grey or brown outputT3 (inside this article)Grey/brown is a wrong VAE, not NaN — handled separately in the same article
After a TDR, an old DirectX program shows only black images#126Windows TDR recovery mechanism, not ComfyUI VAE decoding
The monitor itself is black or shows no signal#105 / #110 familyOutput layer, not the generation layer
Automatic1111 / Forge produces a black imageSame mechanism, different toolThe corresponding switch there is `--no-half-vae`; this article covers ComfyUI only
Image quality is poor, the subject is wrong, or the colours look oddModel / prompt layerA quality problem, not a whole image turned pure black

Neighbour articles and the boundary map

This article is #567, and its companion in the same batch is #568, which covers a faster-whisper long recording with whole segments missing. The two share a batch and a diagnostic style — five layers, seven steps, decisive tests — but nothing else: one is image generation in ComfyUI, the other is speech transcription in faster-whisper, and they share no test, no variable, and no outcome.

The closest neighbours, read closely. Article #564 is the LoRA training out-of-memory article. It covers training steps against validation sampling, the AdamW optimiser state, gradient checkpointing, and LoRA rank. Its variables (optimiser precision, micro-batch, rank) are all different from this article's four tests (VAE decode precision flag, preview timing, VAE file, forced fp32), and its outcome is "out of memory or completes", not a colour. Article #564 contains zero occurrences of "black image", "NaN", and "fp32-vae" in full, and "ComfyUI" appears in it only once, in a boundary-table handover. The out-of-memory route (backup item FX3) covers VAE decode out of memory: its two tests are VAE decode stage timing plus tiled VAE, and its outcome is "out of memory or completes". This article's outcome is a colour, and its shape has no error at all. Article #179 is the local-AI memory-planning article: quantisation levels and how much memory a VAE decoder takes before purchase — a planning calculation, not a run-time VAE diagnosis. Article #561 is the faster-whisper article: device, `compute_type`, and model size — inference-tool settings, not ComfyUI. Article #126 is the overclocking-instability article: it mentions that after a TDR, an old DirectX program may show only black images, which is a Windows driver-reset mechanism, not ComfyUI VAE decoding — and #126 contains zero occurrences of "ComfyUI" and "VAE".

The library scan. Across the whole article library, "ComfyUI" appears in Chinese and English only in article #564, once (the boundary-table handover); "fp32-vae" appears zero times in both languages; "black image" appears only in #126 (twice, in a Windows TDR/DirectX context, not ComfyUI), while "all-black image" and "grey image" appear zero times in both languages; the token "NaN" appears zero times in either language (case-sensitive) — the six-article list in the draft was a case-insensitive substring artefact ("nan" inside "AnandTech" in #124, #125 and #478, "Nanite" in #396, and "Dominance" in #548; #219 has no hit at all) — and #564 contains zero occurrences; "fp16" appears in Chinese only in #179, #453, and #561, and in English only in #179 and #561 (case-insensitive matching; case-sensitively it is only #561 in both languages), all outside the ComfyUI VAE context; "VAE" appears in either language only in #179 and #564; the Chinese term "VAE 解碼" appears only in #179 and #564; "force-fp32" appears zero times in both languages; the Chinese term for all-black appears in 46 articles, all in display-output or game-screen contexts, and #564 is not among them.

Sources and honesty gaps

The facts in this article come from the following sources, checked by search on 2026-11-24: the freakyjolly guide "ComfyUI Black Image Fix: Every Cause and Fix (2026)", at https://freakyjolly.com/comfyui-black-image-fix/, for the symptom shape ("The workflow finishes and there is no error, but the Save Image node shows a solid black square"), for the NaN mechanism ("In nearly every case, a number inside the model overflowed and became NaN"), for the terminal warning `RuntimeWarning: invalid value encountered in cast`, for the cause table (SDXL fp16 VAE, wrong or blank VAE, GTX 16-series with `--force-fp32`, SageAttention / `--fast` / `--force-fp16`, extreme CFG, wrong-family LoRA), and for the preview-timing distinction; the localaimaster guide "ComfyUI Black Image Fix: NaN, VAE and fp8 by Model", at https://localaimaster.com/blog/comfyui-black-image-fix, for the symptom shape ("The queue completes, the progress bar fills, the node graph goes green, and the SaveImage node writes a valid PNG that happens to be 100% #000000"), for the official parameter description of `--fp16-vae` ("Run the VAE in fp16, might cause black images"), for "Grey or brown output is a different bug entirely — that is the wrong VAE, not a NaN", for "NaN clips to zero. Zero is black", for the Automatic1111 / Forge switch `--no-half-vae`, and for the version note (ComfyUI v0.33.1, 2026-08-13); the tutorial3d.it guide "ComfyUI Not Working? Errors and Fixes (2026)", at https://www.tutorial3d.it/en/ai-artificial-intelligence/comfyui-errors-fixes/, for the precision-problem statement ("An all-black image, with no errors, usually comes from a calculation precision problem in the VAE"), for the VAE file examples (`sdxl_vae_fp16_fix.safetensors` for SDXL, `ae.safetensors` for Flux), for `--fp32-vae`, and for the warning that `--force-fp32-vae` does not exist; and the numonic guide "Black or NaN image output (VAE)", at https://www.numonic.ai/integrations/comfyui-errors/black-or-nan-image-vae, for the mechanism ("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") and for the three causes (fp16-unstable VAE, wrong-family VAE, damaged VAE).

Three honesty gaps must be stated plainly. First, there was no local reproduction: ComfyUI was not run on a local machine for this article, so the terminal warning line, the actual effect of each flag, and the `sdxl_vae_fp16_fix` file name all come from the external sources listed above, and flag names may differ between versions — localaimaster uses v0.33.1 as its reference while tutorial3d.it uses 0.46, so readers should check their own version with `python main.py --help` rather than treating a flag name as absolute. Second, the VAE file names differ between checkpoint families (SD 1.5, SDXL, Flux), and this article gives only the two verified examples — SDXL and Flux — while the SD 1.5 file must be checked against the reader's checkpoint documentation rather than guessed. Third, new checkpoints released in 2026 may overturn the older rules — localaimaster states this directly — so the fixes in this article are as verified on 2026-11-24, and readers on a new model should follow that version's documentation. Two source conflicts were handled by stating the scope rather than picking a side: localaimaster calls `--fp32-vae` the "single fastest fix", while freakyjolly lists the fixed VAE file and the flag side by side — the two are not contradictory, only differently ordered, so this article uses the order "locate with T2 first, then test precision with T1 and the file with T3", because the flag and the file are two different layers and the order must not be decided by which one is faster; and freakyjolly lists a wrong VAE among the black-image causes while localaimaster states that grey or brown is "a different bug entirely" — the two are not contradictory, only different in definition, so this article follows localaimaster's mechanism split: pure black is NaN, grey or brown is a wrong VAE, and test T3 separates them.

Frequently asked questions

Is the model broken?

No. A broken model usually reports an error; a black image with no error is most commonly a number overflowing to NaN. Half precision (fp16) has a maximum of about 65,504, and some VAEs — most famously the SDXL one — produce intermediate values above that ceiling during fp16 decoding. NaN cannot be converted to a colour, so it is clipped to zero, and zero is black. The workflow still finishes, because NaN never triggers an exception. Check the terminal for `RuntimeWarning: invalid value encountered in cast`, then run test T1 with `--fp32-vae`.

The preview looks normal while sampling, but the final image is black. How is that different from a preview that is black from the first step?

A preview that looks normal during sampling and only turns black at the end means the fault is in VAE decoding, not in the sampler. The sampler works in latent space and its preview looks normal; the VAE decoder turns the latent into pixels, and that is where the numbers overflow. Run test T1 — launch with `--fp32-vae` or load `sdxl_vae_fp16_fix.safetensors` — and if the image comes back normal, the VAE decode precision layer is confirmed. A preview that is black from the first step is a different problem: it points at the model or the sampler — an fp16-unstable new model, an acceleration option such as SageAttention, `--fast`, or `--force-fp16`, or a CFG value pushed to an extreme. Switch those options off, lower the CFG, or try another checkpoint. Test T1 will not help there, because the fault sits before the VAE decoder.

My image is grey or brown, not pure black. Is that NaN too?

No. Grey or brown output is a wrong VAE — a different bug entirely, not NaN; localaimaster states it directly, grey or brown is a wrong VAE and pure black is NaN. A wrong-family VAE, a damaged download, or a 0-byte file produces grey or brown. Load a VAE that is certainly from the right family — `sdxl_vae_fp16_fix.safetensors` for SDXL, `ae.safetensors` for Flux — and if the image comes back normal, the VAE file layer is confirmed. That is test T3.

What is the difference between `--fp32-vae` and `--force-fp32`? Can they be used interchangeably?

`--fp32-vae` is a VAE-decode-only flag: it runs only the VAE decoder in fp32. `--force-fp32` forces the whole pipeline to fp32 and is much slower; it is mainly for GTX 16-series cards that do not handle fp16 reliably (test T4). The two must not be treated as the same switch. Also note that `--force-fp32-vae` does not exist at all — ComfyUI gives no warning for a mistyped flag name, it simply has no effect. Check the flags your own version accepts with `python main.py --help`.

There is no `RuntimeWarning` in the terminal. Does that mean it is not NaN?

No. The absence of the warning does not exclude NaN — the warning is printed only once and is easily buried under later queue messages. If there is no warning, carry on with test T2 (preview timing) and tests T1 and T3 (precision and VAE file comparisons) rather than excluding NaN for lack of a warning line.

My GTX 1650/1660 always produces black images. Does running `--force-fp32` mean it is fixed?

Running `--force-fp32` and getting a normal image proves only that this card does not handle fp16 reliably — it is a diagnosis and a workaround, not a fix for every card. Forced fp32 for the whole pipeline is much slower, so in the long term the choice is between accepting that speed cost on this card or changing the card. If both runs are black, the fault is not in the card's precision capability — go back to tests T1 and T3.

I have run all four tests and still cannot separate the cause. What now?

Record five things — the checkpoint, the VAE file name, the launch flags, the terminal warning line, and the moment the preview turned black — and bring those notes to a check. Do not reinstall ComfyUI or the driver one after another — reinstalling cannot change VAE precision. If there is a hardware suspicion (for example, the machine itself is unstable, or the graphics card behaves abnormally during generation), the machine can be taken to the workshop for a further check.

Conclusion

A ComfyUI black image with no error is a precision problem with a fixed shape: a finished workflow, a valid PNG, and a picture that is 100% black because a number overflowed to NaN. The four comparisons in this article — the fp32 VAE flag, the preview timing, the VAE file, and forced fp32 on GTX 16-series cards — separate the VAE decode precision layer, the model and sampler layer, the VAE file layer, and the card's own precision capability, with the colour of the output as the only judge, and each one changes exactly one variable on the same workflow. Grey and brown are kept honest too: they are a wrong VAE, not NaN, and they are fixed by changing the file, not the flag.

When to seek professional help: if the machine crashes, if the graphics card is not detected, or if all four tests fail to separate the cause — or if the workflow fails with an error that no setting changes — the problem is no longer a precision flag. It may involve the driver, the installation, or the hardware itself, and is worth having checked by a technician.

If the tests point to a hardware fault rather than a setting — the card is not detected, the machine crashes, or generation fails with an error that no setting changes — the card and the setup can be checked at the Shek Mun workshop: Dali Plaza, Room 1209, Shek Mun, Hong Kong. Phone 2186 8010, WhatsApp 6558 6806. Diagnosis and repair pricing follows the workshop's published three-tier range of HK$400–HK$2,800, quoted before any work begins.

Related articles

Related services

If you need Chip-level GPU repair, see these service pages: