ipadaptergenerated

IPAdapter Advanced(IPAdapterAdvanced)

IPAdapter Advanced node from ComfyUI-IPAdapter-plus.

IP Adapter Advanced

model
ipadapter
image
image_negative
attn_mask
clip_vision
MODEL
weight
1.00
weight_type
COMBO
combine_embeds
COMBO
start_at
0.000
end_at
1.000
embeds_scaling
COMBO
IPAdapter plus

Description

IPAdapter Advanced applies an IPAdapter (image prompt adapter) to a diffusion model, injecting visual conditioning taken from one or more reference images into the model's attention layers. It is the more configurable sibling of the basic IPAdapter apply node: on top of the model, adapter, and image, it exposes control over the weight curve, how multiple image embeddings are merged, the sampling range over which the adapter is active, and how the embeddings are injected into attention.

The node does not load anything by itself. It expects an IPADAPTER object that was already created by an IPAdapter loader (together with a CLIP Vision encoder), and a MODEL to patch. The returned model is a patched copy: the input model is left untouched, so the same base model can be reused with different adapter settings and the results connected to separate samplers.

Typical uses include style transfer, character consistency, face and clothing reference, and composition guidance. Because the adapter is applied to the model rather than to the conditioning, the patched model must be passed to the sampler in place of the original.

Inputs

Required Inputs

  • model (MODEL): The diffusion model to patch. This is normally the output of a checkpoint or UNet loader, or the output of an earlier IPAdapter node if you are chaining several adapters.

  • ipadapter (IPADAPTER): The IPAdapter model produced by an IPAdapter loader. It carries the projection weights that map CLIP Vision features into the diffusion model's conditioning space.

  • image (IMAGE): The reference image (or batch of images) to condition on. If a batch is supplied, each image is encoded separately and the resulting embeddings are merged according to combine_embeds.

  • weight (FLOAT, default 1, range -1 to 5, step 0.05): Overall strength of the adapter. 0 disables the effect, 1 is the neutral setting, and values above 1 push the reference harder at the risk of over-saturation, color shift, or loss of prompt adherence. Negative values invert the direction of the conditioning and are rarely useful outside experimentation.

  • weight_type (COMBO): Selects the weighting curve used when the adapter is applied across the model's attention blocks and layers. Different curves concentrate the effect in different parts of the network, which changes whether the result leans toward style transfer, composition transfer, or a stronger, more literal copy of the reference. The exact list of available curves is defined by the loaded IPAdapter model.

  • combine_embeds (COMBO): How the embeddings of a multi-image batch are merged before they are applied.

    OptionBehavior
    concatConcatenates the embeddings, keeping every image distinct. Most faithful for multi-image references and the most memory hungry.
    addSums the embeddings element-wise. Blends references together.
    subtractSubtracts later embeddings from earlier ones. Useful for removing a concept present in one reference.
    averageTakes the element-wise mean of the embeddings. A balanced blend of all references.
    norm averageAverages and then normalizes the result, keeping the magnitude close to that of a single embedding. Usually the safest choice when mixing several references of different strengths.
  • start_at (FLOAT, default 0, range 0 to 1, step 0.001): The fraction of the sampling schedule at which the adapter becomes active. 0 means active from the very first step.

  • end_at (FLOAT, default 1, range 0 to 1, step 0.001): The fraction of the sampling schedule at which the adapter stops being applied. 1 means active through the final step. Setting start_at greater than or equal to end_at effectively disables the adapter.

  • embeds_scaling (COMBO): Controls which parts of the attention calculation receive the adapter's embeddings, and how they are normalized.

    OptionBehavior
    V onlyOnly the value tensor is modified. The most conservative mode and the least likely to disturb prompt adherence.
    K+VBoth keys and values are modified, giving the reference image more influence over spatial arrangement as well as appearance.
    K+V w/ C penaltyModifies keys and values with an additional penalty on the conditioning term, which counteracts the tendency of strong conditioning to blow out contrast.
    K+mean(V) w/ C penaltyUses a mean-based value term in place of the per-token value alongside the key modification, with the same penalty. The most aggressive mode, generally used with a lower weight.

Optional Inputs

  • image_negative (IMAGE): A reference image to steer away from. Its embedding is subtracted from the positive conditioning, which is useful for suppressing an unwanted style, color cast, or attribute. Leaving it unconnected keeps the standard positive-only behavior.
  • attn_mask (MASK): A spatial mask that limits where the adapter is allowed to influence the image. The mask is matched to the reference image, with white areas receiving the adapter and black areas excluded. This is the standard way to apply an IPAdapter only to a region, such as a face or a garment, and pairs well with inpainting and regional prompting workflows.
  • clip_vision (CLIP_VISION): An optional override for the CLIP Vision encoder used to encode the reference image. When connected, it replaces the encoder carried by the ipadapter input, which allows mixing an adapter with a different vision backbone. When omitted, the encoder from the adapter is used, which is the normal case.

Outputs

  • MODEL: The patched model with the IPAdapter attention hooks installed. Connect it to the sampler (or to another IPAdapter node if you are stacking adapters) instead of the original model. Because the patch is returned as a new model object, it composes cleanly with other model patches such as LoRA or ControlNet loaders.

Usage Notes

  • Chain several IPAdapter Advanced nodes to combine multiple reference images or styles, for example one node per character plus a final node for overall style. The order in which the nodes are chained affects the result, so experiment with ordering before adjusting weights.
  • Use start_at and end_at deliberately. Starting the adapter late lets the base prompt establish composition before the reference image takes over; ending it early preserves fine detail and reduces the plastic look that strong conditioning can produce in the final steps.
  • If results look washed out or over-saturated at a high weight, try a lower weight, switch embeds_scaling to V only, or move from concat to norm average when using multiple images.
  • Very high weight values combined with concat on a large batch of images is the most memory-intensive configuration. Reducing the batch size or switching to one of the averaging modes is the quickest fix.
  • image_negative and attn_mask are genuinely optional. With neither connected, the node behaves like a straightforward strength-controlled IPAdapter application.
  • Because the node returns a patched model, wiring the same patched model into several samplers reuses the same adapter settings. If you need different settings for different passes, create a separate IPAdapter Advanced node for each one.

Comments

Sign in with GitHub to join the discussion.

Loading comments…