IPAdapter ClipVision Enhancer Batch(IPAdapterClipVisionEnhancerBatch)
IPAdapter ClipVision Enhancer Batch node from ComfyUI-IPAdapter-plus.
IP Adapter Clip Vision Enhancer Batch
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
| Input | Type | Default / Range | Description |
|---|---|---|---|
model | MODEL | required | The diffusion model that receives the IPAdapter attention patches. |
ipadapter | IPADAPTER | required | The IPAdapter weights and configuration to apply. |
image | IMAGE | required | Reference image or image batch used for positive image conditioning. Clear, well-lit references generally produce more stable results. |
weight | FLOAT | default 1, min -1, max 5, step 0.05 | Strength 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_type | COMBO | required | Selects how the adapter weight is applied. The available choices are supplied by the installed package and appear in the node's combo menu. |
start_at | FLOAT | default 0, min 0, max 1, step 0.001 | Normalized sampling step at which IPAdapter application begins. 0 starts at the first step. |
end_at | FLOAT | default 1, min 0, max 1, step 0.001 | Normalized 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_scaling | COMBO | required; options: V only, K+V, K+V w/ C penalty, K+mean(V) w/ C penalty | Controls which parts of the cross-attention are scaled by the image embeddings. See the option descriptions below. |
enhance_tiles | INT | default 2, min 1, max 16 | Number 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_ratio | FLOAT | default 0.5, min 0, max 1, step 0.05 | Controls 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_size | INT | default 0, min 0, max 4096 | Batch 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
| Option | Behavior |
|---|---|
V only | Scales 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+V | Scales 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 penalty | Applies K+V scaling with a conditioning penalty intended to temper over-strong image influence. |
K+mean(V) w/ C penalty | Uses 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
| Input | Type | Description |
|---|---|---|
image_negative | IMAGE | Optional 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_mask | MASK | Optional mask that restricts where the IPAdapter attention is applied. Leave unconnected to apply the adapter globally. |
clip_vision | CLIP_VISION | Optional 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
Batchvariant is intended for workflows that pass anIMAGEbatch; the same IPAdapter settings are applied to the batch whileencode_batch_sizehelps control CLIP Vision memory use. - Start with
weightat1,start_atat0, andend_atat1to 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_tileswhen small details or secondary features in the reference are being lost. Since each extra tile adds encoding work, raise it gradually and lowerencode_batch_sizeif you run out of VRAM. - Keep
enhance_rationear the default0.5for 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_negativewhen the reference contains elements you want to suppress, and useattn_maskwhen the adapter effect should be limited to a specific spatial area. - Only provide
clip_visionwhen 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.