Nodes/ComfUI-EGAdapterMadAssistant/IPAdapter Mad Assistant
ComfyUI Node

IPAdapter Mad Assistant

Per-layer IPAdapter weights without the typing

By 11dogzi·Created 2 years ago·Updated 2 years ago· 40
IPAdapter Mad Assistant
    • layer_weights
    0layer Weight0.0
    1layer Weight0.0
    2layer Weight0.0
    3layer Weight0.0
    4layer Weight0.0
    5layer Weight0.0
    6layer Weight0.0
    7layer Weight0.0
    8layer Weight0.0
    9layer Weight0.0
    10layer Weight0.0
    11layer Weight0.0
    RandomNo
    seed0

    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's layer_weights input.

    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_weights widget 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.

    Categoryipadapter

    Inputs (14)

    NameTypeDefaultDescription
    0layer WeightFLOAT0.00–1
    1layer WeightFLOAT0.00–1
    2layer WeightFLOAT0.00–1
    3layer WeightFLOAT0.00–1
    4layer WeightFLOAT0.00–1
    5layer WeightFLOAT0.00–1
    6layer WeightFLOAT0.00–1
    7layer WeightFLOAT0.00–1
    8layer WeightFLOAT0.00–1
    9layer WeightFLOAT0.00–1
    10layer WeightFLOAT0.00–1
    11layer WeightFLOAT0.00–1
    RandomCOMBONo2 options: Yes, No
    seedINT0-1125899906842624–1125899906842624

    Outputs (1)

    NameTypeDescription
    layer_weightsSTRING