Extend Clip Vision Input Size
ComfyUI Node Guide
- clip_vision
- CLIP_VISION
Every CLIP vision encoder you've ever used is locked to one input size, and you probably never noticed. Feed it a 1024px reference photo and it gets silently squashed down to 224x224 (or 336, depending on the checkpoint) before the model ever looks at it. That's just how these things were trained. This node exists to break that lock - it patches a loaded CLIP vision model so it can accept a different resolution than the one baked into it at training time.
Why would you want that? Because a CLIP-ViT vision encoder is a Vision Transformer: it chops your image into a grid of patches and has one learned positional embedding per patch slot. That grid is fixed size, which is the actual reason input resolution is locked - not some hard architectural limit. Resize the positional embedding grid to match a bigger patch layout (a well-known ViT trick, the same idea behind running a transformer at a resolution it wasn't originally trained at), and the same weights can process a higher-resolution image. More patches means more of your reference image's detail reaches the model instead of getting blurred away in a downscale.
The author built this as plumbing for their own experimental IP-Adapter finetune - trained on NoobAI-XL at 448x448 instead of the usual 224 - so the node's whole job is making a stock CLIP vision checkpoint (ViT-bigG-14, the one SDXL and its finetunes like NoobAI-XL use) accept that larger size.
Inputs and output
Only two inputs, both required:
- clip_vision - a
CLIP_VISIONobject, i.e. whatever comes out of a CLIP Vision Loader node. This is the encoder you're patching. - target_size - an integer, default 448, ranging 224 to 1344 in steps of 112. Leave it at 448 if you're using the author's NoobAI-XL finetune (that's what it was trained on); only change it if you know a different finetune expects a different size.
The output is a CLIP_VISION object too, patched. Wire it into an IP-Adapter node's clip_vision input downstream - this pack's sibling node, IPAdapter Advanced (Clip Size Aware), is built to read it - or anywhere else in your graph that consumes a CLIP vision encoder.
Worth being honest about: this interpolates the positional embeddings, not the transformer's learned weights, which were trained seeing a 224-patch layout. Interpolating the position grid is a real, established ViT technique, but it's still an approximation, and it pays off best paired with a model actually finetuned at the new size - like the author's own checkpoint. Patch a stock encoder to 448 and point it at an IP-Adapter that's never seen anything but 224, and don't expect much; you're not adding information the model wasn't trained to use.
Installing it
- ComfyUI Manager - search "ComfyUI-ExtendIPAdapterClipVision" and install.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/vahlok-alunmid/ComfyUI-ExtendIPAdapterClipVision, then restart ComfyUI.
The pack itself ships no model files - it's a patch operation that runs on a CLIP vision model you've already loaded. Separately you'll need: a CLIP vision checkpoint compatible with your base model (ViT-bigG-14 for SDXL/NoobAI-XL), and - if you want the actual benefit - the author's finetuned IP-Adapter weights, linked from the pack's Civitai page, since that's the model this whole extension exists for.
You'll also want cubiq's ComfyUI_IPAdapter_plus installed alongside it. This pack doesn't replace it - it only patches the CLIP vision object and adds one apply node; the loader nodes (CLIP Vision Loader, IPAdapter Model Loader) still come from cubiq's pack.
Common issues
"Nothing changed, my results look the same." Check that this node's output actually feeds the clip_vision input downstream, rather than the loader's raw output going straight in. It's easy to build the graph with the loader feeding the sampler path and the IP-Adapter node directly, forgetting the patch sits in between.
Outputs look soft or wrong at a non-448 target_size. Expected, per the caveat above - without a matching finetune, you're asking a 224-native model to make sense of a grid layout it's never seen.
Wrong tool for the job. If you're not using the author's NoobAI-XL style-transfer finetune, you probably don't need this node - mainstream IP-Adapter workflows on cubiq's pack use the standard 224/336 sizes and work fine without any of this. It's a narrow companion piece, not a general "make any encoder bigger" utility, and it's a single-author, low-traffic repo - the README and its example workflow image are close to the whole documentation, so don't expect a community thread to lean on.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| clip_vision | CLIP_VISION | — | |
| target_size | INT | 448224–1344 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CLIP_VISION | CLIP_VISION | — |