IPAdapter Style & Composition SDXL(IPAdapterStyleComposition)
IPAdapter Style & Composition SDXL node from ComfyUI-IPAdapter-plus.
IP Adapter Style Composition
Description
The IPAdapter Style & Composition SDXL node (class IPAdapterStyleComposition) applies two IPAdapter reference paths to a model: one driven by a style image and one driven by a composition image. It is intended for SDXL workflows and is categorized under ipadapter/style_composition. The node lets you set independent strengths for style and composition, choose how the two embeddings are combined, and schedule the active range across the diffusion process. Optional inputs allow a negative reference image, an attention mask, and a specific CLIP vision encoder.
Inputs
Required
- model (
MODEL): The diffusion model to patch with the IPAdapter style and composition conditioning. - ipadapter (
IPADAPTER): The IPAdapter configuration, including weights and projection layers, used for both reference paths. - image_style (
IMAGE): The style reference image. Its influence is controlled byweight_style. - image_composition (
IMAGE): The composition reference image. Its influence is controlled byweight_composition. - weight_style (
FLOAT, default1, min-1, max5, step0.05): Strength of the style reference. Negative values invert the effect;0effectively disables the style path. Values above1increase style influence. - weight_composition (
FLOAT, default1, min-1, max5, step0.05): Strength of the composition reference. Negative values invert the effect;0effectively disables the composition path. Values above1increase composition influence. - expand_style (
BOOLEAN, defaultfalse): Enables the expanded style behavior for the style reference. Leave it disabled for the normal style embedding; enable it when you want the style path to have broader influence. - combine_embeds (
COMBO, defaultaverage): How the style and composition embeddings are merged. Options areconcat,add,subtract,average, andnorm average.averageprovides a balanced blend,concatkeeps the embeddings separate before merging,addandsubtractcombine them element-wise, andnorm averageaverages with normalization. - start_at (
FLOAT, default0, min0, max1, step0.001): The point in the diffusion process where IPAdapter application begins, expressed as a fraction of the total steps.0means the start of sampling. - end_at (
FLOAT, default1, min0, max1, step0.001): The point in the diffusion process where IPAdapter application ends, expressed as a fraction of the total steps.1means the end of sampling. Setstart_atbelowend_atfor a normal active window. - embeds_scaling (
COMBO): Controls how attention embeddings are scaled. Options areV only,K+V,K+V w/ C penalty, andK+mean(V) w/ C penalty. These modes trade off value-only scaling, key and value scaling, and variants that include a penalty term.
Optional
- image_negative (
IMAGE): An optional negative reference image. When supplied, it can steer the IPAdapter away from the features of this image. - attn_mask (
MASK): An optional attention mask that limits where the IPAdapter influence is applied. Use it to confine style or composition effects to masked regions. - clip_vision (
CLIP_VISION): An optional CLIP vision encoder to use for the reference images. Supply it when you need to override the default vision encoder used by the IPAdapter setup.
Outputs
The current source definition declares no output sockets for this node. Configure it through the inputs above according to the package's workflow conventions.
Usage Notes
- Both
image_styleandimage_compositionare required. To use only one reference type, set the other path's weight to0or use the dedicated single-reference IPAdapter node. - Weights accept negative values. A negative style or composition weight reverses that reference's effect rather than simply reducing it.
- Use
start_atandend_atto apply the IPAdapter only during part of sampling. This is useful when you want composition established early and style refined later, or when you want to avoid over-constraining the final steps. combine_embedschanges how the two references interact. If style and composition compete, tryaverageornorm average; if you want to preserve their distinct features, tryconcat.- The optional
attn_maskis useful for regional application, whileimage_negativecan help suppress unwanted traits from the reference images. embeds_scalingaffects attention behavior and may need adjustment for different IPAdapter weights. Start with the default option provided by your workflow and change it only when you need a specific key/value scaling behavior.
Comments
Sign in with GitHub to join the discussion.