LatentClamp
The nothing-node that keeps latent-heavy graphs sane
- latent
- LATENT
Despite the name, LatentClamp doesn't clamp anything. There's no min/max, no value capping, no math. It takes a LATENT in and hands the exact same LATENT out. It's a pass-through node - and if you've ever stared at a ComfyUI graph where latent wires cross three times, you know why those earn their keep.
What it's for
A latent is the compressed image representation flowing from an EmptyLatentImage (or a VAEEncode) into a KSampler and out to a VAEDecode. It has no on-canvas preview and no widgets, so its wires are pure plumbing - and plumbing is what turns into spaghetti as a workflow grows. LatentClamp gives that wire a physical node you can:
- title, so the edge says what it's for ("main pass latent", "img2img input")
- grab, to re-route the connection without dragging a wire across half the canvas
- branch from, when one latent needs to feed two downstream paths
- anchor a debugger at a known spot in the pipeline
It's the same instinct as a reroute node - turning a graph "too large to read into one you can still work in," as the ecosystem doc describes rgthree's contribution - but it works for heavy object types like LATENT that primitive nodes can't hold.
How it works
The implementation is def node(self, latent): return (latent,). The same Python object comes back out - no copy, no transform, no measurable cost. It's part of Allor's "clamp" family: 13 identical pass-throughs covering MODEL, VAE, IMAGE, MASK, CONDITIONING and friends, so you can use the same trick on any heavy wire.
Input: latent (LATENT, required). Output: LATENT. That's the whole contract - it cannot corrupt or alter anything, because it holds no reference to the value.
Installing Allor
LatentClamp ships in the Allor Plugin, Nourepide's ~90-node image-processing pack. Install via ComfyUI Manager (search "Allor") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor
Restart ComfyUI. First run writes a config.json into the pack folder; the bundled install.sh / install.bat can install the requirements into your venv or embedded Python. The pack's dependency list (rembg, onnx, plus onnxruntime via rembg) exists for its segmentation nodes - a pass-through like this touches none of it.
Common issues
The pack's known weak spot is updates: its history was rebased to strip image files, the README warns auto-updates can break, and users report Allor nodes silently vanishing after an update. A fresh re-clone fixes it; "update_frequency": "never" in config.json avoids the risk.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |