Nodes/Allor Plugin/ImageClamp
ComfyUI Node

ImageClamp

The node that does nothing, on purpose

By Nourepide·Created 3 years ago·Updated 2 years ago· 295
ImageClamp
  • image
  • IMAGE

ImageClamp takes an image in and returns the exact same image. Not resized, not normalized, not clamped in any numeric sense - a literal pass-through. If that sounds useless, you're not wrong about the mechanism, but you're missing the point. This is a deliberate tool, and once you've fought ComfyUI's eager execution model for a while, you'll get why it exists.

It's one of the Allor Plugin's "clamp" family (Nourepide/ComfyUI-Allor), and the pack ships a whole row of them - ClipClamp, ModelClamp, LatentClamp, MaskClamp, VaeClamp, and so on. Every one has the same shape: value in, identical value out. The clamp nodes are reference-holding utilities: they keep a value alive and connected in the graph without consuming it, so you can wire something to a place that uses it while a separate branch just needs to know the value exists.

What it's actually for

ComfyUI only executes nodes that are actually needed by whatever you queue, and it can free intermediate outputs once nothing downstream needs them. The practical job of a clamp node is to act as a stable anchor. You use it to:

  • Pin a value so it isn't dropped. If you want to inspect or reuse an image after a long pipeline but nothing in the main path references it, running it through a clamp (and hanging a preview off that) keeps the reference valid.
  • Break dependency chains you don't want. A pass-through gives you a clean node to hang a Preview Image or Save Image off without creating feedback loops or forcing a big subgraph to re-run.
  • Keep the same image flowing to two consumers with a tidy split, where one path is "just keep it alive."

In short, it's the ComfyUI idiom for "I want this data on the table even if the main recipe doesn't need it right now." For beginners it reads as a useless no-op; for people debugging or doing multi-branch work, it's the difference between an image mysteriously vanishing and having it exactly where you expect.

The mechanism

Honestly? return (image,). That's the entire implementation. There's no clamping of pixel values - if that's what you came for (say, clipping out-of-range values before a node that chokes on them), this isn't it. The name is borrowed from the software-engineering pattern of a "clamp" that pins a reference, not from math.

The input is image (IMAGE) and the output is IMAGE. One in, one out, nothing else.

Installing it

It ships in the Allor Plugin:

cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor

or search "Allor" in ComfyUI Manager and restart. The clamp module has zero dependencies beyond what ComfyUI already has - the pack's rembg/onnx install is for its segmentation nodes, not these.

Gotchas

The real confusion is expectation mismatch: people click a node named "Clamp," assume it clips values, and get a pass-through. If you need actual numeric clamping, look at the math/image-op packs instead. Also note Allor's startup noise: it checks for updates on every launch (disable with updates.auto_update: false in config.json), and old installs can hit git update errors after the repo's history-rebase - a fresh clone cures it. This pack barely surfaces on reddit, so for the finer points of its clamp family, the author's docs at nourepide.github.io/ComfyUI-Allor-Doc are the real source.

Categoryclamp

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE