None Constant
A node that outputs nothing, on purpose
- value
"None Constant" is the least exciting node you'll ever install, and it knows it. Zero inputs, one output named value, and that output is always Python's None. The entire point is the output's type: *, the wildcard. In ComfyUI that means it can plug into almost any input slot, and downstream code that does if mask is not None gets a genuine, explicit None instead of a missing connection or a ghost value.
So when does "explicitly nothing" actually help? A few real cases:
- Optional masks, conditionings, or model slots. Some nodes (controlnet conditioning, masking helpers) accept a None and treat it as "no mask, no extra condition." If a workflow template leaves that slot empty, it can behave differently than if it's fed a literal None - this node makes the "nothing here" intentional and visible.
- Clearing a stale wire without deleting it. You've got a reroute or a shared input you don't want feeding this run. Drop a NoneConstant on it and the value is cleanly null instead of whatever was there.
- Node backends that key off
is not None. A handful of community packs branch on whether an argument arrived at all versus arriving as None. This is the only stock-ish way to produce that distinction on demand.
The implementation is four lines: get_none returns (None,). That's not a flaw - for a utility like this, the mechanism is the type system trick.
The honest caveat
Most ComfyUI nodes do not tolerate None. Feed this into a required tensor input and you get a traceback, not graceful handling. NoneConstant is only useful where the receiving node explicitly handles None - so the workflow that benefits from it is rarer than the node is simple. If you've never once thought "I wish I could pass nothing here," you almost certainly don't need this node.
It's also not a reason to install the pack by itself. It ships alongside the pack's actual headline node (Snap to Nearest Aspect Ratio), and it's fine to think of it as a freebie you'll maybe touch once.
Install
Same as the rest of the pack - pure Python, no dependencies, no models:
cd ComfyUI/custom_nodes
git clone https://github.com/pipelet-ai/ComfyUI-PredefinedResolution.git
Restart ComfyUI, or search "PredefinedResolution" in ComfyUI Manager.
Troubleshooting
- "Expected tensor, got None." That's the downstream refusing to cooperate, not the node. Reroute it to a slot that actually accepts None, or delete it - the wildcard type doesn't override a receiver that insists on real data.
- It vanished from the menu. This pack's three nodes all live under the "utils" category; if Manager shows the pack installed but the node isn't there, check the install actually placed it under
custom_nodes/ComfyUI-PredefinedResolution.
Verdict: a correctly-built one-trick node for a genuinely niche case. Keep it in your back pocket for those "why won't this slot take an empty input" afternoons.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |