generated

IPAdapter ClipVision Enhancer Batch(IPAdapterClipVisionEnhancerBatch)

IPAdapter ClipVision Enhancer Batch node from ComfyUI-IPAdapter-plus.

IP Adapter Clip Vision Enhancer Batch

model
ipadapter
image
image_negative
attn_mask
clip_vision
weight
1.00
weight_type
COMBO
start_at
0.000
end_at
1.000
embeds_scaling
COMBO
enhance_tiles
2
enhance_ratio
0.50
encode_batch_size
0
IPAdapter plus

Description

IPAdapterClipVisionEnhancerBatch applies an IPAdapter to a diffusion model while adding a CLIP Vision enhancement pass over the reference image. It is the batch-oriented variant of the IPAdapter ClipVision enhancer: it accepts an IMAGE input that may contain multiple images, encodes the reference conditioning with optional tiling or cropping controlled by enhance_tiles and enhance_ratio, and applies that conditioning to the model over a configurable portion of the sampling schedule. The optional image_negative, attn_mask, and clip_vision inputs let you add negative image guidance, restrict where the adapter acts, or override the CLIP Vision encoder.

Use this node when a single CLIP Vision embedding of the reference image does not capture enough subject or style detail, or when you need to apply the same IPAdapter settings to a batch of reference images. The enhancement step increases encoding work, so tune enhance_tiles, enhance_ratio, and encode_batch_size together for quality and VRAM use.

Inputs

All required inputs must be provided. Optional inputs can be left unconnected.

Required Inputs

InputTypeDefault / RangeDescription
modelMODELrequiredThe diffusion model that receives the IPAdapter attention patches.
ipadapterIPADAPTERrequiredThe IPAdapter weights and configuration to apply.
imageIMAGErequiredReference image or image batch used for positive image conditioning. Clear, well-lit references generally produce more stable results.
weightFLOATdefault 1, min -1, max 5, step 0.05Strength of the IPAdapter effect. 0 disables it; values above 1 push the effect harder; negative values are allowed by the range and may invert or counteract the reference depending on the selected weight type.
weight_typeCOMBOrequiredSelects how the adapter weight is applied. The available choices are supplied by the installed package and appear in the node's combo menu.
start_atFLOATdefault 0, min 0, max 1, step 0.001Normalized sampling step at which IPAdapter application begins. 0 starts at the first step.
end_atFLOATdefault 1, min 0, max 1, step 0.001Normalized sampling step at which IPAdapter application ends. 1 continues through the final step. Keep this greater than start_at; equal values leave no active range.
embeds_scalingCOMBOrequired; options: V only, K+V, K+V w/ C penalty, K+mean(V) w/ C penaltyControls which parts of the cross-attention are scaled by the image embeddings. See the option descriptions below.
enhance_tilesINTdefault 2, min 1, max 16Number of tiles or cropped views used by the CLIP Vision enhancement step. 1 uses a single-view encoding; higher values add more views and increase encoding cost.
enhance_ratioFLOATdefault 0.5, min 0, max 1, step 0.05Controls the proportion or coverage of the enhancement tiles. The default 0.5 gives a balanced view; lower values concentrate on smaller regions, while higher values include more of the original image context.
encode_batch_sizeINTdefault 0, min 0, max 4096Batch size for encoding the enhanced views with CLIP Vision. 0 lets the node use its default encoding behavior; positive values limit how many views are encoded at once, which can reduce peak VRAM use.

embeds_scaling options

OptionBehavior
V onlyScales only the value (V) part of cross-attention. This is the most conservative option and leaves the key side of the attention mostly unchanged.
K+VScales both the key (K) and value (V) parts. This gives the image conditioning more control over attention selection as well as content.
K+V w/ C penaltyApplies K+V scaling with a conditioning penalty intended to temper over-strong image influence.
K+mean(V) w/ C penaltyUses a mean-pooled value representation together with the conditioning penalty. This is a more specialized variant; test it when the standard K+V options feel too strong or unstable.

Optional Inputs

InputTypeDescription
image_negativeIMAGEOptional negative reference image for negative image conditioning. Use it to push results away from unwanted content in the reference. If unconnected, only the positive image conditioning is used.
attn_maskMASKOptional mask that restricts where the IPAdapter attention is applied. Leave unconnected to apply the adapter globally.
clip_visionCLIP_VISIONOptional CLIP Vision encoder override. If unconnected, the node uses the encoder associated with the IPAdapter or its loader. Connect a compatible encoder only when you intentionally want to change the vision model used for the image embeddings.

Outputs

The current source metadata declares no outputs for this node.

Usage Notes

  • The Batch variant is intended for workflows that pass an IMAGE batch; the same IPAdapter settings are applied to the batch while encode_batch_size helps control CLIP Vision memory use.
  • Start with weight at 1, start_at at 0, and end_at at 1 to apply the adapter across the full sampling schedule. Narrow the step range if the adapter over-constrains the result or if you only want it to affect a specific phase of generation.
  • Increase enhance_tiles when small details or secondary features in the reference are being lost. Since each extra tile adds encoding work, raise it gradually and lower encode_batch_size if you run out of VRAM.
  • Keep enhance_ratio near the default 0.5 for a balanced enhancement. Lower values can emphasize tighter regions or details; higher values can preserve more overall composition and context, depending on the source image.
  • Use image_negative when the reference contains elements you want to suppress, and use attn_mask when the adapter effect should be limited to a specific spatial area.
  • Only provide clip_vision when you have a compatible encoder and a reason to override the default. A mismatched CLIP Vision model can reduce IPAdapter quality.

Comments

Sign in with GitHub to join the discussion.

Loading comments…