IPAdapter Extend Clip Vision Input Size
Your IPAdapter Reference Is Being Squashed to 224px — This Node Unstops the Straw
- clip_vision
- CLIP_VISION
Here's the part of IPAdapter nobody warns you about: the CLIP vision encoder that reads your reference image squashes it to 224×224 before it does anything else (336 for Kolors). A face that fills a 1024px portrait gets crushed into a thumbnail, and the fine detail you were trying to borrow - the freckles, the fabric weave, the tiny markings on a character design - is gone before the adapter ever sees it. This node fixes exactly that. It retunes the encoder so it can read your reference at up to 1344×1344, which is the difference between "kinda looks like them" and "that's the outfit, those are the stitches."
Where it sits and what it does
This is a model_patches node in the pamparamm fork of cubiq's ComfyUI_IPAdapter_plus - the pack the KB calls the de facto reference implementation for IP-Adapter. The upstream pack doesn't have this node; pamparamm pulled it in (adapted, GPL-3.0, with credit) from vahlok-alunmid's standalone ComfyUI-ExtendIPAdapterClipVision. So if you're running the plain cubiq pack, search your node list in vain - it's not there.
Mechanically it's neat and small. The encoder's positional embedding is an nn.Embedding sized for a 16×16 patch grid (224 / 14px patch size). The node splits off the class token, reshapes the rest into a 2D grid, bicubic-interpolates it to target_size / 14 per side, and builds a new embedding. Then it patches the model in place via clip_vision.patcher.add_object_patch(...) and sets clip_vision.image_size = target_size. Downstream, the encode path reads that image_size and resizes your reference to it before running the model - so the same CLIP vision encoder now genuinely sees more pixels.
The two inputs that matter
Only two, and you'll touch one of them.
clip_vision- the CLIP vision model, normally straight fromCLIPVisionLoader. This is where the magic happens, but the node mutates that model object in place. Wire the output into wherever your workflow feeds clip vision (the IPAdapter apply node, or the Unified Loader's optionalclip_visionslot).target_size- an INT, default 448, min 224, max 1344, stepping by 112. 224 is native, i.e. a no-op. 448 (the default) quadruples the patch count and is the sweet spot for most reference shots. Higher is for when you're chasing real fine detail and can pay for it.
The single output is the patched CLIP_VISION. There's nothing else to configure.
The price, and the gotchas
Bigger is not free. Token count scales with the square: 448 gives 32×32 = 1024 patches, 896 gives 64×64 = 4096, 1344 gives a whopping 9216. You're only paying for the vision-encoder pass, not the UNet, so it's far cheaper than upscaling your whole generation - but set 1344 "just because" and you'll notice the encode step crawl and the VRAM meter climb. Where people get burned: they expect a free lunch at 896+, and they don't get one.
Two install traps worth knowing. First, this is a fork, and Manager will happily offer both it and cubiq's original under near-identical names - make sure you install pamparamm's, and don't run both side by side, because they register the same node classes and ComfyUI will choke on the duplicates. Second, the README is emphatic that IPAdapter requires the latest ComfyUI, and that Manager's auto-update sometimes silently fails - if a fresh install misbehaves, update ComfyUI manually before debugging anything else.
You still need the right encoder for your IPAdapter model (ViT-H for SD1.5, bigG for SDXL) - this node resizes what you give it, it won't fix a mismatched model. And one honest caveat: this whole trick lives in the SD 1.5/SDXL era. On a 2026 base, character consistency has mostly moved to instruction-edit models. But if you're still running an Illustrious or SDXL workflow and your IPAdapter references keep losing their fine detail, this is the single best one-node fix in the pack.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| clip_vision | CLIP_VISION | — | |
| target_size | INT | 448224–1344 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CLIP_VISION | CLIP_VISION | — |