Nodes/ControlFlowUtils/πŸ–ΌοΈ Fallback Image Previewer
ComfyUI Node

πŸ–ΌοΈ Fallback Image Previewer

Never Let a Missing Image Kill Your Workflow

By VykosXΒ·Created 2 years agoΒ·Updated 2 years agoΒ· 147
πŸ–ΌοΈ Fallback Image Previewer
  • images
  • passthrough
β—„fallback_width512β–Ί
β—„fallback_height512β–Ί
β—„save_imagefalseβ–Ί
β—„filename_prefixComfyUIβ–Ί

Here's a ComfyUI annoyance you've definitely hit: a preview node with no image on its input doesn't just show nothing - it errors and kills the whole run. If you're building conditional workflows where an image might not exist on every branch (this pack's whole reason for existing), that's a constant footgun. FallbackImagePreviewer (πŸ–ΌοΈ Fallback Image Previewer, from ControlFlowUtils) exists specifically to make that problem disappear.

When no valid image arrives, instead of dying it generates a black placeholder at a size you choose, shows it, and moves on. The workflow keeps running, the preview slot stays populated, and your conditional logic doesn't blow up.

Inputs and output

  • images (required) - the image(s) to preview. This is the one thing that matters most, and the one thing you might leave unconnected.
  • fallback_width / fallback_height - dimensions of the placeholder (default 512Γ—512, step 256). Set either to 0 and no placeholder is generated at all - the node just quietly skips the preview. That's your "silently ignore" mode.
  • save_image - off by default. On, and (when real images are present) it saves them to ComfyUI's output folder instead of just displaying.
  • filename_prefix - the prefix for saved files (default ComfyUI), same convention as the stock save nodes.

The passthrough output returns the image - placeholder or real - so you can chain it into a Save Image or a compare node. That output is a nice bonus: the node doesn't just display a fallback, it emits one, which means downstream nodes that require an IMAGE input keep working too.

Where it matters

Conditional generation. Say your IF Selector decides whether to run a face-refine pass; on the "no" branch there's no image, but you still want a preview wired up so the workflow doesn't error. This node is the difference between "workflow works with a blank preview" and "workflow dies whenever that branch doesn't fire."

The mechanics are straightforward: it subclasses ComfyUI's stock PreviewImage and adds the fallback path on top. No placeholder gets saved (save_image only acts on real images, per the description), and the black placeholder makes it visually obvious that a branch produced nothing - which is usually the information you wanted anyway.

One honest note: a black square is not a subtle "nothing here" signal. If you're generating many images and skimming results, the black placeholders are the point - they tell you which branches produced nothing without any node erroring. If you'd rather the preview just not exist, set a dimension to 0.

Install

FallbackImagePreviewer ships in VykosX/ControlFlowUtils:

# ComfyUI Manager β†’ Install Custom Nodes β†’ search "ControlFlowUtils"
# or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/VykosX/ControlFlowUtils

Restart, find it under 🐺 VykosX-ControlFlowUtils, and swap it in anywhere you previously had to defensively wire a dummy image just to keep a preview alive. No dependencies, no model files.

Category🐺 VykosX-ControlFlowUtils

Inputs (5)

NameTypeDefaultDescription
imagesIMAGEThe images to preview
fallback_widthoptINT5120–16384Width of the placeholder image that will be generated if no Images are provided.
fallback_heightoptINT5120–16384Height of the placeholder image that will be generated if no Images are provided.
save_imageoptBOOLEANfalseβ€”
filename_prefixoptSTRINGComfyUIβ€”

Outputs (1)

NameTypeDescription
passthroughIMAGEβ€”