π§ Show Error Message
A node that intentionally crashes your graph β and why that's useful
π§ Show Error Message is a node whose entire job is to stop your pipeline on purpose, with your custom message in the error. That sounds like a joke until you've watched a ComfyUI graph silently produce wrong output for twenty minutes because a condition you assumed was true wasn't. This is the fail-loudly tool.
You use it as a guard rail. In a workflow where a value has to be above zero, or a file has to exist, or an input has to be connected - you don't want to discover the violation in the final image. You want it to halt now, with a message that says exactly what's wrong. It's the "assert" of ComfyUI, and it's genuinely the right tool for shared workflows where the person running it isn't you and won't know what "NaNs in step 40" means - but will understand "Source image must be square before upscale."
How it works
It's brutally simple. Two inputs:
- message - the text that shows up in the error when it fires.
- trigger - a boolean. If True, execution halts with your message as the exception. If False, nothing happens and the run continues.
There are no outputs, and it's flagged as an output node, so it sits at the end of a chain (or anywhere) waiting to be the last thing that runs. The interesting bit is that trigger is a forced input - it's meant to be wired from something, not toggled by hand. Feed it a Compare or a logic/boolean node, and you've built a conditional abort: "halt unless this check passes." Wire a constant True into it and you've got a manual kill-switch that always errors - handy mid-debugging when you want a hard stop at a specific point.
Installing it
Part of ComfyUI-SuperNodes (GitHub: sonnybox/ComfyUI-SuperNodes) by SuperCC. ComfyUI Manager β search SuperNodes β install β restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/sonnybox/ComfyUI-SuperNodes
# restart ComfyUI
Just matplotlib as a dependency; needs a current ComfyUI (newer comfy_api extension API).
Where people get burned
The default bites: trigger defaults to True, so if you add the node and don't wire anything into it, every run halts with "Message." - the literal default text - and you'll spend a confused minute figuring out which node killed the queue. The message is your debugging breadcrumb: use it to say why, not that. And keep in mind halting is exception-based: it will show up as an error in the queue and stop the whole run, not just skip a branch. If you want soft conditional routing instead of a hard stop, you want a switch node, not this one.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| message | STRING | Message. | β |
| trigger | BOOLEAN | true | If True, execution halts. If False, nothing happens. |
Outputs (0)
No outputs