ComfyUI Node

Image Exists

The 'is this input connected?' check that won't crash your VAE

By mickmumpitz·Created 8 months ago·Updated 9 days ago· 47
Image Exists
  • image
  • image
  • exists

Image Exists is a tiny conditional node from the Mickmumpitz pack: pass an image through, and also report whether there actually was an image. In a workflow builder where one branch sometimes gets wired and sometimes doesn't - say, an optional reference image that's only there for some shots - you need to know at run time which case you're in, and a boolean is the cleanest way to express that.

It's a utility, not a showpiece, and it's aimed at exactly one pattern: you want a value that's present-or-absent, but ComfyUI doesn't love "absent" as a data type. So this node converts absence into a false boolean, and gives you a real IMAGE either way, so downstream nodes always have something to hold.

How it works

If the image input is connected, the node returns it untouched plus exists = True. If it's not connected, it returns a 64x64 black placeholder plus exists = False. The placeholder size is the detail that makes this node trustworthy: the author deliberately chose 64x64 rather than 1x1, because ComfyUI's VAE crop function rounds tiny images down to 0x0 and crashes. So the fallback is engineered to survive VAE encoding and downstream image ops on setups where an unused branch still gets evaluated. That's the difference between this node and a naive image is None check.

Pair it with the pack's lazy switches (like PreprocessSwitch or MatchModeSwitch) or your own conditional routing: exists drives the decision, image carries the payload.

The inputs and outputs

  • image (IMAGE, optional) - the image to test and pass through.

Outputs:

  • image (IMAGE) - your input untouched if connected, or the 64x64 black placeholder if not.
  • exists (BOOLEAN) - true if an image was connected, false otherwise.

Wire exists into a conditional or a boolean switch to route the graph differently depending on whether the branch is populated.

Installing it

Part of the Mickmumpitz pack - ComfyUI Manager, search "Mickmumpitz", install, restart:

cd ComfyUI/custom_nodes
git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes.git

No models, no extra deps beyond the pack baseline.

Common issues

The honest gotcha is conceptual: exists tells you whether the input slot was connected at submit time, not whether the image "makes sense." An all-black render, or a batch that's been disconnected mid-loop, still counts as existing. For iteration-loop stopping you usually want a semantic check - the pack's has_frames outputs on the slicer nodes - not this one. Use Image Exists for wiring-level questions: "was this branch populated?", and you'll be right every time.

CategoryMickmumpitz/Utils

Inputs (1)

NameTypeDefaultDescription
imageoptIMAGE

Outputs (2)

NameTypeDescription
imageIMAGE
existsBOOLEAN