ComfyUI Node

Model Inspector

The map you need before you bend anything

By abuzreq·Created about a year ago·Updated 3 months ago· 21
Model Inspector
  • model
  • STRING
  • MODEL
path_placeholder

Model Bending needs a path like middle_block.2.out_layers, and nobody remembers those. Model Inspector is the node that prints the model's whole module tree so you can find them. It's a pass-through - you drop it inline between your checkpoint loader and the sampler, it does nothing to your image, and it hands you the map.

Think of it as the pack's own Model Inspector (yes, the name is doing double duty) - but where that one is a debug dump, this one is a navigation tool for a specific job: picking a target path for a bend. It ships alongside Model VAE Inspector for VAEs; this one is for MODEL inputs.

How it works

The node walks the model's module tree recursively and builds a nested dictionary of every child module and its type, then pushes that JSON to the browser through ComfyUI's prompt-server channel (model_bending.inspect_model). The tree is exactly what Model Bending's process_path consumes, so a path copied from the Inspector should resolve.

Inputs:

  • model (MODEL) - from your checkpoint or model loader.
  • path_placeholder (STRING) - a text field that does nothing except echo back to you. It exists so you have somewhere to park the path you're about to type into Model Bending.

Outputs:

  • STRING - whatever you put in path_placeholder, passed through.
  • MODEL - the model, unchanged, continuing to your sampler or next node.

The workflow

Wire it inline: Load Checkpoint → Model Inspector → Model Bending → KSampler. Run once, read the tree in the UI, copy a path into Model Bending, and delete or bypass the Inspector if you want (or leave it - it's free). Because it passes the model through untouched, you never have to rewire your graph to use it; it's the definition of a zero-risk node.

Installing

Part of the ComfyUI-Model-Bending pack:

cd ComfyUI/custom_nodes
git clone https://github.com/abuzreq/ComfyUI-Model-Bending

Restart ComfyUI and refresh, or install via ComfyUI Manager (search ComfyUI-Model-Bending). Deps are kornia + scikit-learn, no model files. Keep the clone folder as ComfyUI-Model-Bending - the README's ComfyUI-Web-Bend-Demo name is stale.

Where people get tripped up

If the tree is huge and overwhelming, start at the middle_block branch - the README's showcase effects all live there, and it's a compact subtree to read. Also note this dumps the full module tree including every wrapper class; Model Bending strips architecture-prefix noise (diffusion_model, Flux, BaseModel) automatically, so a path that reads "long and wrong" often still works. And on SD models specifically, the Model Bending (SD Blocks) and (SD Layers) nodes exist precisely so you can skip this step - if you're not in the mood to read a module tree, those nodes do the navigation for you.

Categorymodel_bending

Inputs (2)

NameTypeDefaultDescription
modelMODEL
path_placeholderSTRING

Outputs (2)

NameTypeDescription
STRINGSTRING
MODELMODEL