generated

IPAdapter Style & Composition Batch SDXL(IPAdapterStyleCompositionBatch)

IPAdapter Style & Composition Batch SDXL node from ComfyUI-IPAdapter-plus.

IP Adapter Style Composition Batch

model
ipadapter
image_style
image_composition
image_negative
attn_mask
clip_vision
weight_style
1.00
weight_composition
1.00
expand_style
start_at
0.000
end_at
1.000
embeds_scaling
COMBO
IPAdapter plus

Description

IPAdapter Style & Composition Batch SDXL applies two IPAdapter image prompts to an SDXL model at the same time: one that drives visual style and one that drives composition (layout and structure). Keeping the two signals on separate adapters lets you, for example, borrow the palette and rendering of one reference image while following the framing of another.

The "Batch" variant is intended for workflows where the style and/or composition images arrive as a batch, allowing a single style reference to be paired with a whole batch of composition images (see expand_style). Use it when you want to condition a model on paired style and composition references rather than a single averaged image prompt.

This node is part of the ComfyUI-IPAdapter-plus package and is tailored to SDXL models; for non-SDXL checkpoints use the corresponding non-SDXL style and composition nodes.

Inputs

Required Inputs

  • model (MODEL): The diffusion model to patch. This is the SDXL model that the IPAdapter weights will be applied to.
  • ipadapter (IPADAPTER): The IPAdapter configuration/weights to use. Supplies the adapter that is injected into the model.
  • image_style (IMAGE): The reference image that defines the style (color, texture, rendering, medium). This image is encoded by CLIP vision and drives the style adapter.
  • image_composition (IMAGE): The reference image that defines composition (layout, pose, structure). This image drives the composition adapter.
  • weight_style (FLOAT, default 1, range -1 to 5, step 0.05): Strength of the style adapter. 1 is the nominal strength; values above 1 amplify the style, values below 1 soften it, and negative values invert the direction of the effect.
  • weight_composition (FLOAT, default 1, range -1 to 5, step 0.05): Strength of the composition adapter. Same semantics as weight_style, applied to the composition signal.
  • expand_style (BOOLEAN, default false): When enabled, the style image is expanded to match the batch size of the composition images, so one style reference can be paired with every item in a composition batch. Leave this off when the two inputs already share a matching batch size.
  • start_at (FLOAT, default 0, range 0 to 1, step 0.001): Fraction of the sampling schedule at which the adapters begin to apply. 0 means active from the first step. Raising it delays the adapter's influence, which can preserve early composition decisions from the base prompt.
  • end_at (FLOAT, default 1, range 0 to 1, step 0.001): Fraction of the sampling schedule at which the adapters stop applying. 1 means active through the final step. Lowering it releases the adapter near the end, letting the base model refine details.
  • embeds_scaling (COMBO, options: V only, K+V, K+V w/ C penalty, K+mean(V) w/ C penalty): How the IPAdapter embeddings are injected into cross-attention.
    • V only: Only the value vectors are modified. The least invasive option, generally good for style transfer.
    • K+V: Both key and value vectors are modified, giving stronger and more structural influence.
    • K+V w/ C penalty: Key and value modification with an additional scaling penalty on the key component, which tames overly strong key influence and helps avoid over-burning.
    • K+mean(V) w/ C penalty: Uses the key plus the mean of the value, with the same penalty, for a more balanced injection.

Optional Inputs

  • image_negative (IMAGE): A reference image whose characteristics should be pushed away from, acting as a negative image prompt for the adapter. Useful for suppressing an unwanted style or composition trait.
  • attn_mask (MASK): A mask that restricts where the adapter takes effect, for example limiting influence to a region so the rest of the canvas follows the base prompt.
  • clip_vision (CLIP_VISION): Overrides the CLIP vision model used to encode the reference images. Supply it when you want a specific vision encoder rather than the adapter's default.

Outputs

The current source interface does not declare any outputs for this node. Treat it as an adapter step that patches the incoming model and place it in the model chain accordingly.

Usage Notes

  • Tune weight_style and weight_composition independently: start both at 1, then adjust one at a time so you can tell which reference is responsible for a change in the output.
  • If the composition leaks into the style or the colors dominate the layout, lower the offending weight rather than raising the other one.
  • expand_style is the key control for batch workflows: with a single style image and a batched set of composition images, turn it on so every composition item receives the same style conditioning.
  • Use start_at and end_at to stage the adapters within sampling. Late start_at lets the base prompt establish layout first; early end_at lets the model polish without the adapter's pull.
  • embeds_scaling changes how aggressively the embeddings enter attention. V only is a safe default for subtle style work; the K+V variants apply stronger structural pressure and the penalty variants reduce the chance of over-burning.
  • Add image_negative when a specific look keeps bleeding in, and attn_mask when the adapter should only affect part of the image.
  • Changing clip_vision changes the embedding space the references are encoded into, so pair it only with adapters trained against a compatible vision encoder.

Comments

Sign in with GitHub to join the discussion.

Loading comments…