Prep Image For ClipVision
Control how your reference gets cropped
- image
- IMAGE
Small node, real usefulness. The CLIP vision encoder that IP-Adapter uses wants a square, low-resolution image (224px), and if you hand it a tall portrait or a wide landscape, something has to crop and resize it. By default that happens automatically and you don't get a say. Prep Image For ClipVision gives you the say - you decide how the reference is cropped and resized before it ever reaches the adapter.
That matters more than it sounds. IP-Adapter can only condition on what the encoder actually sees. If your reference is a full-body shot and the auto-crop grabs the center, you might be feeding the model a torso when you wanted the face. Prep the image deliberately and you control what the reference is.
Inputs and outputs
One image in, one image out - the prepped version, ready to feed into any apply node's image input. The controls:
- crop_position - the setting. Options are
top,bottom,left,right,center, andpad. For a portrait where the face is up top,topkeeps the face and drops the body.centeris the usual default behavior.padis the important escape hatch: instead of cropping anything away, it pads the image to square, so nothing is lost - use this when the whole frame matters and you can't afford to cut any of it. - interpolation - the resampling algorithm for the downscale:
LANCZOS,BICUBIC,HAMMING,BILINEAR,BOX,NEAREST. LANCZOS is the high-quality default and rarely worth changing. - sharpening - 0 to 1, default 0. A little sharpening can recover crispness lost when the image is crushed down to 224px. A small amount (say 0.1–0.3) sometimes helps detail transfer; too much introduces artifacts.
When to bother
You don't always need this - the apply nodes crop fine on their own for centered subjects. Reach for it when:
- Your subject isn't centered (crop to
topfor a face at the top of the frame, etc.). - You're feeding a wide or tall reference and the default center-crop is throwing away the part you care about.
- You want the entire reference considered - use
padso nothing gets cut. - Detail transfer looks soft and a touch of
sharpeningmight claw some back.
It's a framing tool, plain and simple. Think of it as aiming the encoder at the right part of your reference. On faces especially, controlling the crop is the difference between "the model saw the face" and "the model saw a shoulder."
Installing the pack
ComfyUI Manager: search "IPAdapter plus" in the Custom Nodes Manager, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus, then restart ComfyUI. This particular node needs no model of its own - it's pure image preprocessing - but it only earns its keep in front of the rest of the IP-Adapter pack, which needs the IP-Adapter models in ComfyUI/models/ipadapter and CLIP vision encoders in ComfyUI/models/clip_vision. Update ComfyUI if anything fails to load.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| interpolation | COMBO | 6 options: LANCZOS, BICUBIC, HAMMING, BILINEAR, BOX, NEAREST | |
| crop_position | COMBO | 6 options: top, bottom, left, right, center, pad | |
| sharpening | FLOAT | 0.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |