generated

IPAdapter Precise Composition(IPAdapterPreciseComposition)

IPAdapter Precise Composition node from ComfyUI-IPAdapter-plus.

IP Adapter Precise Composition

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

Description

IPAdapter Precise Composition (class IPAdapterPreciseComposition) is an IPAdapter-plus node for applying image-prompt embeddings to a diffusion model with extra control over composition. It takes a model, an IPAdapter, a reference image, and optional negative image, attention mask, and CLIP vision encoder. Compared with a basic IPAdapter application, it exposes a composition_boost control plus detailed settings for embedding combination, active sampling range, and embedding scaling. Use it when you want the layout or composition of the reference image to influence generation more precisely.

Inputs

Required Inputs

  • model (MODEL): The diffusion model that receives the IPAdapter patching or conditioning. Connect this from your checkpoint or model loader before passing the result to the sampler.
  • ipadapter (IPADAPTER): The IPAdapter configuration and weights. This determines the adapter architecture and the encoder pairing used with the reference image.
  • image (IMAGE): The positive reference image. Its visual content provides the image prompt that the IPAdapter applies to the model.
  • weight (FLOAT): Overall strength of the IPAdapter effect. Default is 1.0; allowed range is -1.0 to 5.0; step is 0.05. Higher values generally increase influence. Negative values are allowed and can produce inverted or contrast-style effects, while very high values may overpower the text prompt or cause artifacts.
  • composition_boost (FLOAT): Extra emphasis applied to composition-related features from the reference image. Default is 0.0; allowed range is -5.0 to 5.0; step is 0.05. Positive values push the result toward the reference image's spatial layout or structure; negative values reduce or reverse that emphasis. Use this to tune composition separately from the general weight.
  • combine_embeds (COMBO): How image embeddings are combined when more than one embedding is present. Options are concat, add, subtract, average, and norm average. concat joins embeddings, add sums them, subtract applies a difference, average takes the mean, and norm average averages after normalization. This setting mainly matters when positive and negative or multiple image embeddings are involved.
  • start_at (FLOAT): Fraction of the sampling schedule where the IPAdapter effect begins. Default is 0.0; allowed range is 0.0 to 1.0; step is 0.001. At 0.0, the adapter is active from the first step. Increase it to delay the adapter's influence.
  • end_at (FLOAT): Fraction of the sampling schedule where the IPAdapter effect ends. Default is 1.0; allowed range is 0.0 to 1.0; step is 0.001. At 1.0, the adapter remains active through the final step. Decrease it to stop the adapter earlier. Keep start_at lower than end_at for a normal active window.
  • embeds_scaling (COMBO): How key and value embeddings are scaled during IPAdapter attention. Options are V only, K+V, K+V w/ C penalty, and K+mean(V) w/ C penalty. V only scales value embeddings only; K+V scales both key and value embeddings; the two C penalty variants add a conditioning penalty during scaling. These are advanced controls: start with a simple option and change them only when you need finer control over strength and fidelity.

Optional Inputs

  • image_negative (IMAGE): An optional negative reference image. When connected, it provides features to push the result away from, complementing the positive image. Leave it unconnected for no negative image influence.
  • attn_mask (MASK): An optional spatial mask that limits where the IPAdapter effect applies. Use it to restrict the reference influence to selected regions of the image and reduce its effect in masked-out areas.
  • clip_vision (CLIP_VISION): An optional CLIP vision encoder override. If omitted, the IPAdapter uses its configured vision encoder. Connect this only when you need to force a specific CLIP vision model or when the adapter expects an explicit encoder.

Outputs

No outputs are declared in the current source definition. This node does not expose an output socket in this release according to the extracted facts.

Usage Notes

  • Use composition_boost as a separate dial for structural fidelity. If the reference image's general style is too strong but its composition is not being followed closely enough, lower weight and raise composition_boost; if the composition is too rigid, reduce composition_boost.
  • Restrict start_at and end_at when the adapter should affect only the early, middle, or late part of sampling. Early steps often shape layout and composition, while later steps refine texture and detail.
  • combine_embeds and embeds_scaling are advanced settings. Leave them at sensible defaults until you have a specific need for embedding merging or attention scaling behavior.
  • Connect attn_mask when the reference image should influence only a region, such as a character, object, or foreground area, rather than the entire canvas.
  • Use image_negative when certain visual traits from the reference image should be suppressed rather than encouraged.
  • Provide clip_vision only when you need to override the IPAdapter's default vision encoder. Mismatched encoders can reduce the adapter's effectiveness.

Comments

Sign in with GitHub to join the discussion.

Loading comments…