ipadapter/devgenerated

IPAdapter Mad Scientist(IPAdapterMS)

IPAdapter Mad Scientist node from ComfyUI-IPAdapter-plus.

IP Adapter MS

model
ipadapter
image
image_negative
attn_mask
clip_vision
insightface
weight
1.00
weight_faceidv2
1.00
weight_type
COMBO
combine_embeds
COMBO
start_at
0.000
end_at
1.000
embeds_scaling
COMBO
layer_weights
STRING
IPAdapter plus

Description

IPAdapterMS (Mad Scientist) is an experimental IPAdapter application node in the ipadapter/dev category of ComfyUI-IPAdapter-plus. It attaches image prompt conditioning to a diffusion model while exposing controls that are normally hidden or fixed in simpler IPAdapter nodes, including per-layer weights, embedding combination modes, embedding scaling strategies, an active step range, an attention mask, and optional FaceID support.

This node is intended for users who want to tune how an IPAdapter influences a model beyond the standard weight and weight type controls. Because many of its parameters interact, small changes can produce noticeably different results. Use it when you need fine control over layer behavior, timestep range, or how multiple embeddings are combined.

Inputs

Required Inputs

InputTypeDefaultRangeDescription
modelMODELThe diffusion model that receives the IPAdapter conditioning.
ipadapterIPADAPTERThe IPAdapter model or adapter configuration to apply.
imageIMAGEThe image prompt used to condition the model.
weightFLOAT1.0-1.0 to 5.0, step 0.05Overall strength of the image prompt. Values above 1 strengthen the effect, values below 1 weaken it, and negative values can invert the influence.
weight_faceidv2FLOAT1.0-1.0 to 5.0, step 0.05Separate weight for FaceID v2 adapters. It controls the strength of the face identity contribution when an InsightFace provider and FaceID adapter are used.
weight_typeCOMBOSelects the weighting behavior used when applying the image prompt across the model. The available choices are provided by the installed IPAdapter backend and affect how the weight is distributed.
combine_embedsCOMBOconcat, add, subtract, average, norm averageDetermines how multiple image embeddings are combined. concat keeps them as separate concatenated embeddings, add sums them, subtract subtracts them, average takes the mean, and norm average normalizes before averaging.
start_atFLOAT0.00.0 to 1.0, step 0.001The diffusion step, expressed as a fraction from 0 to 1, at which IPAdapter influence begins. For example, a value of 0.2 starts the effect after the earliest steps.
end_atFLOAT1.00.0 to 1.0, step 0.001The diffusion step, expressed as a fraction from 0 to 1, at which IPAdapter influence ends. A value of 0.8 stops the effect before the final steps.
embeds_scalingCOMBOV only, K+V, K+V w/ C penalty, K+mean(V) w/ C penaltyControls how IPAdapter embeddings are scaled in the attention mechanism. V only affects values only, K+V affects keys and values, and the variants with C penalty apply a contrastive penalty for stronger separation. This is an advanced experimental control.
layer_weightsSTRING"" (empty)A string specifying per-layer multipliers for the IPAdapter attention layers. When empty, uniform default weighting is used. The expected syntax and number of entries depend on the loaded IPAdapter model, with entries generally corresponding to cross-attention layers in order.

Optional Inputs

InputTypeDescription
image_negativeIMAGEAn optional negative image prompt. When connected, the model is conditioned away from this image as well as toward the main image.
attn_maskMASKRestricts where the image prompt takes effect in the generated image. Regions with nonzero mask values receive the IPAdapter influence, which is useful for localized edits or subject placement.
clip_visionCLIP_VISIONAn optional CLIP vision encoder used to encode the image prompt. When omitted, the node uses the encoder associated with the loaded IPAdapter. Providing one overrides that choice.
insightfaceINSIGHTFACEAn optional InsightFace provider used for FaceID adapters. This is required when applying a FaceID IPAdapter, since it supplies the face embeddings used for identity conditioning.

Outputs

The current source definition for IPAdapterMS declares no outputs. Use the node according to the package's example workflows and the requirements of your installed IPAdapter version.

Usage Notes

  • Start with a modest weight such as 0.5 to 1.0, then adjust upward or downward. Negative weights can create contrast or inversion effects but often require careful tuning.
  • start_at and end_at are useful for controlling where in the diffusion process the image prompt matters. Starting later can preserve more of the base model's composition, while ending earlier can reduce over-processing or artifacts.
  • Use layer_weights only when you know the layer layout of the loaded IPAdapter. Leaving it empty is the safest default and produces uniform layer weighting.
  • combine_embeds becomes relevant when multiple image embeddings are present, such as with batched images or multiple conditioning inputs. concat preserves more distinct information, while averaging modes can produce smoother, more blended results.
  • embeds_scaling is an experimental control. V only is the least invasive choice, while K+V and the C penalty modes can strengthen or sharpen the adapter's influence at the cost of stability.
  • For FaceID workflows, connect an insightface provider and use weight_faceidv2 to tune the identity contribution independently of the overall weight.
  • Use attn_mask to localize the image prompt to a specific region. This is helpful when the image prompt should affect only part of the canvas rather than the entire generation.
  • image_negative can help when the positive image prompt is producing unwanted traits. It pushes the result away from the negative image while still following the main image prompt.

Comments

Sign in with GitHub to join the discussion.

Loading comments…