IPAdapter Mad Assistant
Per-layer IPAdapter weights without the typing
- layer_weights
IPAdapter Mad Assistant does one thing: it turns the layer_weights string that cubiq's IPAdapter Mad Scientist node (from ComfyUI_IPAdapter_plus) expects into twelve sliders you can drag. Mad Scientist is the advanced IP-Adapter node that lets you set a different weight per attention layer, and normally you type that in by hand - something like 0:0.2,1:0.4,2:0.6 - which is fiddly, error-prone, and easy to forget the format for. This node builds the string for you. That's the whole trick, and honestly it's a good one.
It's a small, honest utility. No API, no key, no model downloads, no Python dependencies beyond the standard library - the pack is a single file of pure Python that string-formats numbers. There's literally nothing here to break, which is exactly what you want from a helper node.
How it works
The node collects twelve slider inputs (0layer Weight through 11layer Weight, all FLOAT, step 0.1, range 0.0–1.0 on this version), joins them into the comma-separated layer:weight format IPAdapter already speaks, and hands the result out as one STRING output named layer_weights. Values on a whole number come out clean (0:1); everything else gets one decimal (3:0.5). No magic.
Those layers map to the 12 injection points of IP-Adapter's decoupled cross-attention. Community rule of thumb: early layers steer overall structure and where content goes, later layers steer style, texture, and mood. That split is the whole reason per-layer weights exist. A single global weight is one knob - but per-layer weights let you hold the composition still while cranking the style. If you've ever felt IPAdapter "takes over" a generation, this is the lever people reach for.
Inputs and outputs that matter
- The twelve sliders - set each layer's injection weight. All default to 0.0 (off).
- Random (
Yes/No) - random mode. It walks the layers, and any layer currently at 0.0 has a shot at getting a random weight in the 0–1 range. Manually-set non-zero weights are never overwritten, so a layer you care about stays where you put it. - seed - deserves a callout: the code declares it but never reads it. Random mode is not reproducible, whatever you type in there.
- Output:
layer_weights(STRING) - wire this into Mad Scientist'slayer_weightsinput.
Where it sits in the workflow
You still need the IPAdapter machinery around it: ComfyUI_IPAdapter_plus installed, the IP-Adapter model files plus image encoder in your models folder, and Mad Scientist in the graph doing the actual injection. In Mad Scientist, right-click the layer_weights widget and choose Convert to Input, then drag from this node's output to that input. Skip the convert step and the string goes nowhere.
How to install
cd ComfyUI/custom_nodes
git clone https://github.com/11dogzi/ComfUI-EGAdapterMadAssistant
Then restart ComfyUI. Or use ComfyUI Manager and search ComfUI-EGAdapterMadAssistant. That's it - no requirements.txt, no pip, no model files. The author (Er Gouzi, a Chinese ComfyUI tutorial creator) links a separate "environment installer" for people who don't want to touch the terminal, but this pack doesn't need it.
Where people get burned
- The output appears to do nothing → you didn't convert Mad Scientist's
layer_weightswidget to an input. - Random mode gives different results every run, seed or no seed → that's inherent to the node, see above.
- The README says "0–10 layers" and calls V2 the "-1 to 1" one. Both are wrong: it's 0–11 layers, and the -1..1 variant is V1. Trust the node over the README - this pack is that lesson in miniature.
It's not life-changing. But if you keep opening Mad Scientist and re-typing the same string, it's the difference between "ugh, again" and dragging a slider. For a zero-dependency node, that's a fair trade.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| 0layer Weight | FLOAT | 0.00–1 | — |
| 1layer Weight | FLOAT | 0.00–1 | — |
| 2layer Weight | FLOAT | 0.00–1 | — |
| 3layer Weight | FLOAT | 0.00–1 | — |
| 4layer Weight | FLOAT | 0.00–1 | — |
| 5layer Weight | FLOAT | 0.00–1 | — |
| 6layer Weight | FLOAT | 0.00–1 | — |
| 7layer Weight | FLOAT | 0.00–1 | — |
| 8layer Weight | FLOAT | 0.00–1 | — |
| 9layer Weight | FLOAT | 0.00–1 | — |
| 10layer Weight | FLOAT | 0.00–1 | — |
| 11layer Weight | FLOAT | 0.00–1 | — |
| Random | COMBO | No | 2 options: Yes, No |
| seed | INT | 0-1125899906842624–1125899906842624 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| layer_weights | STRING | — |