Interactive Bending WebUI
The whole model-bending toy, in your browser
- model
- MODEL
This is the front door to the whole pack, and it's genuinely slick: you drop the node into a graph, wire a model through it, and a browser UI at {your-ComfyUI}/web_bend_demo/ lets you see the model's structure - U-Net or transformer - as an interactive tree. You click layers, pick a bending operation, set its strength, and the model you routed through the node comes out bent. No path strings, no guessing at layer addresses. It's the difference between writing config files and playing a video game.
How it works is worth understanding, because it explains a couple of quirks. The node itself is a passthrough: on queue it registers the model under a session_id (the optional string input, which the frontend auto-fills and hides). The browser talks to ComfyUI's HTTP API to fetch the layer tree and store your bend selections on the server keyed by session. When you queue the prompt, the node's patch reads the session's selections and applies them to a clone of your model - hooks registered per-forward and removed in a finally, so nothing leaks between runs. The selection_hash input is bookkeeping for cache invalidation; you won't touch it.
The magic detail: the README says this is supported and tested for Stable Diffusion and Flux variants. "Tested" is doing a lot of work there - it's the one node in the pack with that claim, and the pack is small. Flux's transformer structure bends differently from SD's U-Net, but the UI handles both, which is more than the older path-string nodes can say.
The workflow loop it's built for: play in the browser until the image does something you love, hit "Copy Bends," then paste that JSON into Apply Bends from JSON to make it reproducible and shareable. The web session is ephemeral and tied to a running browser tab; the JSON is forever.
Install: ComfyUI Manager → search "ComfyUI-Model-Bending" → install → restart ComfyUI and hard-refresh your browser - the UI is served from the pack's web/ directory, and a stale page is the #1 way people think it's broken. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/abuzreq/ComfyUI-Model-Bending
Dependencies: kornia and scikit-learn.
Honest expectations: because bends are applied at queue time from session state, you must queue a prompt after making your browser selections for them to take effect - and if the tab isn't open, the session may not exist when you queue. It's an experimental demo-grade tool with a small, mostly-undocumented community footprint, but it's the fastest path from "I want to poke my model" to "I poked my model" in this pack.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| session_idopt | STRING | — | |
| selection_hashopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |