Activation Probe
The X-ray for your UNet that doesn't touch the picture
- model
- MODEL
- probe
Bending a model is the fun part. Knowing what you just did is the hard part. You multiply one layer of the UNet by 2 and the portrait gets frozen-looking, and now what? Which layer actually moved, at which step, and by how much?
Activation Probe is the answer to that. It watches the layers you name while a sampler runs, records numbers, and changes nothing - the image coming out the other end is bit-for-bit what it would have been without it. It ships in the experimental half of ComfyUI Model Bending alongside Read Activation Probe, and the two are useless apart.
What you'd reach for it for
Two jobs, both of which show up as soon as you start poking at layers:
- Find out whether your bend did anything. Probe a normal run, probe the bent run, compare. No output change on either side, so you're not burning images to measure.
- Build a steering vector. The probe is the front half of the workflow that turns "winter prompt minus summer prompt" into a direction you can add to any prompt. That needs the store option set to keep channel means, which is the one setting beginners get wrong.
If you've never opened the pack before, the order is: Bendable Layer Catalogue to find a path, Model Bending to bend it, this node to see what happened.
How it works
The node clones the model patcher, finds the diffusion model inside it, and registers forward hooks on the layer paths you asked for. Those hooks are registered innermost - after whatever bending hooks are already in the chain - so the probe measures the bent activations no matter where the probe sits relative to the bending nodes. Nothing it captures is written back.
Per site, per denoising step, it records the mean, std, RMS, absolute max, a non-finite count and a dead-channel fraction. It also tracks the current step from ComfyUI's transformer options and resets itself whenever a new sampling run starts (it watches the sigma schedule - length, first sigma, last sigma - and the step counter going backwards). Second-order samplers call the model twice per step; it keeps the first call. Only the conditional half of a CFG batch is measured, and on DiT single blocks the prepended text tokens are dropped so you're looking at the image stream. The snapshot ends up on CPU, which is why this survives long runs.
Inputs and outputs
- model - the model chain you want to watch. The node's MODEL output goes on to the sampler.
- sites - comma-separated layer paths, with
*matching every child, e.g.output_blocks.*.0. The defaultautopicks one site per block for the architecture: on a UNet that'sinput_blocks.*.0, middle_block.1, output_blocks.*.0, on a DiT it's the block lists. The example workflow usesinput_blocks.*.0, input_blocks.4.1, middle_block.1, output_blocks.*.0. - store -
stats(cheapest),stats+channel_means(needed for steering vectors), orstats+spatial_means(keeps the layout, more memory). - strict - optional; turns "that path matched nothing" warnings into errors.
Outputs are MODEL and probe. The probe goes straight into Read Activation Probe (or into the steering-vector node, via the activations the reader hands out).
Install
ComfyUI Manager → search "ComfyUI Model Bending", or:
cd ComfyUI/custom_nodes
git clone https://github.com/abuzreq/ComfyUI-Model-Bending
pip install -r ComfyUI-Model-Bending/requirements.txt
That's kornia and scikit-learn and nothing else - no model downloads. On the Windows portable build use python_embeded\python.exe -m pip install -r ..., then restart ComfyUI. Everything this pack says in the console is prefixed [model-bending], which makes it easy to grep out of a long log.
Where people get burned
- "The probe recorded nothing." The reader raises this itself, and the cause is always the same: the probe's MODEL output isn't feeding the sampler, or the reader's
latentisn't hooked to that sampler's output. The latent is not decoration - it's what forces the reader to run after sampling. - One probe per sampler. A probe handle is a single recording buffer. Reusing one node for both the unbent and bent runs gets you one overwritten run. The example workflow wires two probe nodes for exactly this reason.
- Video models and spatial means. The store has a hard cap of about 16 MB per sample, per site, per step. A WAN block output blows past that instantly, so spatial means get skipped with a warning. On video, use
stats+channel_meansand probe fewer sites. store: statsthen wondering why steering fails. The steering node needs channel means (or spatial means) and will tell you so, but only if you get far enough to try.- The heat map has no reference run. Without one it's absolute values; with one it's a ratio. Comparing against nothing tells you the energies but not whether you changed them.
One more thing worth saying plainly: this pack has essentially no community footprint. The phrase "model bending" appears twice in the entire Reddit corpus, and never in a thread about this author. There is no tutorial to copy from - the README, the demo site and the shipped workflows are the documentation.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| sites | STRING | auto | Comma-separated layer paths; '*' matches every child (e.g. 'output_blocks.*.0'). 'auto' picks one site per block. |
| store | COMBO | stats+channel_means | channel means are needed for steering vectors; spatial means also keep the layout (more memory) |
| strictopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |
| probe | PROBE | — |