IPAdapter Style & Composition Batch SDXL(IPAdapterStyleCompositionBatch)
IPAdapter Style & Composition Batch SDXL node from ComfyUI-IPAdapter-plus.
IP Adapter Style Composition Batch
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, default1, range-1to5, step0.05): Strength of the style adapter.1is the nominal strength; values above1amplify the style, values below1soften it, and negative values invert the direction of the effect. - weight_composition (
FLOAT, default1, range-1to5, step0.05): Strength of the composition adapter. Same semantics asweight_style, applied to the composition signal. - expand_style (
BOOLEAN, defaultfalse): 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, default0, range0to1, step0.001): Fraction of the sampling schedule at which the adapters begin to apply.0means 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, default1, range0to1, step0.001): Fraction of the sampling schedule at which the adapters stop applying.1means 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_styleandweight_compositionindependently: start both at1, 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_styleis 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_atandend_atto stage the adapters within sampling. Latestart_atlets the base prompt establish layout first; earlyend_atlets the model polish without the adapter's pull. embeds_scalingchanges how aggressively the embeddings enter attention.V onlyis a safe default for subtle style work; theK+Vvariants apply stronger structural pressure and the penalty variants reduce the chance of over-burning.- Add
image_negativewhen a specific look keeps bleeding in, andattn_maskwhen the adapter should only affect part of the image. - Changing
clip_visionchanges 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.