Nodes/ComfyUI_IPAdapter_plus/IPAdapter Mad Scientist
ComfyUI Node Runs on cloud

IPAdapter Mad Scientist

The node that hands you every dial at once

By cubiq·Created 3 years ago·Updated about a year ago· 6,090
IPAdapter Mad Scientist
  • model
  • ipadapter
  • image
  • image_negative
  • attn_mask
  • clip_vision
  • insightface
  • MODEL
weight1.00
weight_faceidv21.00
weight_type
combine_embeds
start_at0.000
end_at1.000
embeds_scaling
layer_weights

The name is not a joke and it's not marketing - this is the node cubiq built for people who want to poke at IPAdapter's internals and see what breaks. It's the everything-exposed version of IPAdapter Advanced, and its one killer feature is layer_weights: instead of applying the reference uniformly across the whole model, you get to weight individual attention layers by hand. That's how you do surgical style-vs-content separation - the same territory as B-LoRA and InstantStyle, both of which this pack credits - except here you're driving it manually.

Reach for it when the normal apply node isn't giving you enough control and you actually know (or want to learn) which layers carry style versus structure. If that sentence didn't mean much to you, that's fine - you probably want the plain IPAdapter or IPAdapter Advanced node first, and you can come back here once you've hit their ceiling. Mad Scientist is a power tool, and it's happy to let you make a mess.

How it works

Mechanically it's a standard IPAdapter apply: it patches the model with an image embedding pulled from your reference, injecting it through IPAdapter's own decoupled cross-attention path so your text prompt keeps working alongside it. What's different is the surface area. Every knob the pack has, this node exposes, plus the layer-level override. It takes model, ipadapter, and an image, and returns a single patched MODEL that goes straight to your sampler.

The inputs that matter

  • layer_weights - the reason you're here. A multiline text field where you specify per-layer weights (a comma-separated list keyed by layer index). Leave it blank and the node behaves like a normal advanced apply; fill it in and you're targeting specific layers. This is the "mad scientist" bench - expect to experiment.
  • weight - overall strength, default 1.0. Standard advice holds: drop toward 0.8 when the reference starts overriding your prompt.
  • weight_type - a big enum (linear, ease in/out, several weak/strong profiles, plus style transfer, composition, and strong style transfer). This alone changes the character of the result a lot; if you don't want to hand-edit layer weights, switching to style transfer here is the easy-mode version of what layer_weights does the hard way.
  • weight_faceidv2 - only relevant if you're running a FaceID model through this node; it scales the FaceID v2 contribution and needs the insightface input wired.
  • combine_embeds - how multiple references merge if you feed a batch (concat, add, subtract, average, norm average).

start_at / end_at gate when the adapter is active during sampling, and embeds_scaling controls the injection math - both have sane defaults. Optional attn_mask, image_negative, clip_vision, and insightface are there when you need masking, a negative reference, an explicit encoder, or FaceID.

Installing the pack

Via ComfyUI Manager: search ComfyUI IPAdapter plus, install, restart. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus

Restart afterward, and keep ComfyUI itself up to date - this pack breaks on stale Comfy more than most. CLIP vision encoders go in ComfyUI/models/clip_vision, IPAdapter weights in ComfyUI/models/ipadapter. If you're going to wire the insightface input for FaceID models, you also need the insightface Python package installed in your Comfy environment, which is a notorious install headache in its own right - budget time for it.

Where people get burned

Two things. First, the universal one: the ClipVision/IPAdapter mismatch error. If the node dies with a tensor-size complaint, your CLIP vision encoder doesn't match your adapter - SD 1.5 adapters want the ViT-H encoder, the vit-G and SDXL bigG models want their own. It's the first thing experienced users check, and it's almost always the cause of a fresh "why won't this run."

Second, specific to this node: layer_weights will happily let you produce garbage. There's no safety rail. If your output suddenly looks scrambled or the style vanished entirely, blank the field and confirm the node works as a plain apply first, then reintroduce weights a few layers at a time. Treat it like a debugging session, because that's what it is.

Categoryipadapter/dev

Inputs (15)

NameTypeDefaultDescription
modelMODEL
ipadapterIPADAPTER
imageIMAGE
weightFLOAT1.00-1–5
weight_faceidv2FLOAT1.00-1–5
weight_typeCOMBO15 options: linear, ease in, ease out, ease in-out, reverse in-out, weak input, +9
combine_embedsCOMBO5 options: concat, add, subtract, average, norm average
start_atFLOAT0.0000–1
end_atFLOAT1.0000–1
embeds_scalingCOMBO4 options: V only, K+V, K+V w/ C penalty, K+mean(V) w/ C penalty
layer_weightsSTRING
image_negativeoptIMAGE
attn_maskoptMASK
clip_visionoptCLIP_VISION
insightfaceoptINSIGHTFACE

Outputs (1)

NameTypeDescription
MODELMODEL