Nodes/Allor Plugin/ModelClamp
ComfyUI Node

ModelClamp

A named anchor for the heaviest object in ComfyUI

By Nourepide·Created 3 years ago·Updated 2 years ago· 296
ModelClamp
  • model
  • MODEL

Despite the "clamp" name, ModelClamp clamps nothing. It takes a MODEL in and passes the exact same MODEL out - a pure pass-through with no processing and no parameters. Which sounds like a non-node until you look at what a MODEL wire actually is.

What it's for

MODEL is the loaded diffusion model - a checkpoint plus whatever LoRA stack you've applied, gigabytes of weights sitting in VRAM. It's the heaviest object in your graph, and it's just a reference passed down the wire, so the clamp costs nothing: same object in, same object out. What it buys you is a handle.

A MODEL wire can't be labeled, previewed, or grabbed cleanly off a packed loader node. ModelClamp turns that wire into a named node in the graph - title it "base", title it "detail model" - so when you're tracing which model feeds which KSampler or ModelMergeSimple, you read the labels instead of squinting at lines. It also gives you a clean branch point when one model has to feed both a sampler and a merge node, and a stable anchor for a debugger or a swap later.

That's the same graph-tidiness job reroute nodes do, but for an object type primitives can't hold. If you build big workflows, a few labeled clamps are cheaper than regret.

How it works

The implementation is def node(self, model): return (model,). Nothing is copied or converted - the identical Python object comes back, so there's no performance cost and no way to corrupt the model. ModelClamp is one of 13 pass-through clamps in Allor's "clamp" family, covering VAE, LATENT, IMAGE, MASK, CONDITIONING and friends, all sharing the same one-in-one-out contract.

Input: model (MODEL, required). Output: MODEL.

Installing Allor

ModelClamp 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 handle requirements into your venv or embedded Python. The pack's dependencies (rembg, onnx, plus onnxruntime via rembg) exist for its segmentation nodes - this pass-through touches none of them.

Common issues

The pack's known failure mode 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 keeps you out of that loop.

Categoryclamp

Inputs (1)

NameTypeDefaultDescription
modelMODEL

Outputs (1)

NameTypeDescription
MODELMODEL