Nodes/JPS Custom Nodes for ComfyUI/InstantID Source Prepare Pipe (JPS)
ComfyUI Node

InstantID Source Prepare Pipe (JPS)

Unpack your face-photo framing settings

By JPS-GER·Created 3 years ago·Updated 2 years ago· 100
InstantID Source Prepare Pipe (JPS)
  • imageprepare_settings
  • resize_to
  • offset_width
  • offset_height
  • crop_left
  • crop_right
  • crop_top
  • crop_bottom
  • interpolation
  • sharpening
  • flip

Pairs with InstantID Source Prepare Settings (JPS) - the node that frames the actual identity source photo (crop, resize, flip, sharpen) before InstantID reads it for ArcFace and IdentityNet conditioning. This pipe unpacks that bundle back into individual outputs.

What comes out of it

One input, imageprepare_settings - a BASIC_PIPE (JPS's own bundle, a plain tuple, not Impact Pack's object of the same type name). Ten outputs:

  • resize_to (INT) - resize to target, or keep the source photo's original size.
  • offset_width / offset_height - crop-position nudge.
  • crop_left / crop_right / crop_top / crop_bottom - trim from each edge.
  • interpolation - resize algorithm.
  • sharpening (FLOAT) - post-resize sharpen amount.
  • flip - No, X-Axis, or Y-Axis.

The leanest of this pack's three InstantID prep pipes - no mask_type (that's the Mask Prepare pipe's job), and no padding fields either (unlike both Mask and Pose Prepare), since a face photo you're cropping tight for an identity embedding generally doesn't need padded canvas space the way a mask or a composition reference might.

This node performs no cropping, flipping, or resizing itself - it's routing, handing each value to whatever image-processing node in your graph actually applies them before the result reaches InstantID's source-image input.

This is one leg of a trio: this pack also ships InstantID Pose Prepare Pipe (JPS) for the separate composition/landmark reference InstantID's IdentityNet conditions on, and InstantID Mask Prepare Pipe (JPS) for the region mask constraining where identity injection applies. All three unpack a BASIC_PIPE named imageprepare_settings, all three feed a different input on the actual InstantID apply node downstream, and a full InstantID graph typically runs all three in parallel - worth keeping straight which prep pipe is feeding which image, since mixing them up (wiring a pose reference through the Source prep chain, say) will process the wrong image with the wrong settings even though nothing errors.

Installing it

Ships with the pack. ComfyUI Manager: search JPS Custom Nodes for ComfyUI, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/JPS-GER/ComfyUI_JPS-Nodes.git

Restart afterward, deleting any earlier copy of the pack first. No models for this node specifically - the InstantID checkpoint and InsightFace's ArcFace models it's built to feed come from a separate InstantID node pack, both research/non-commercial licensed.

Where people get tripped up

Without an InstantID Source Prepare Settings (JPS) node upstream, this pipe has nothing to unpack.

Same wiring landmine as the rest of this pack's imageprepare_settings-labeled nodes: Image Prepare Settings (JPS), InstantID Mask Prepare Settings (JPS), and InstantID Pose Prepare Settings (JPS) all output a BASIC_PIPE under that identical name. BASIC_PIPE isn't schema-checked, so this pipe will accept a connection from any of those without complaint, and unpack it into ten misaligned values instead of a clean error - this node expects a shorter, no-padding field layout that only Source Prepare Settings actually produces. If your source photo isn't ending up cropped, flipped, or resized the way you configured, trace imageprepare_settings back to confirm it's genuinely coming from Source Prepare Settings and not one of its similarly-named cousins before you start second-guessing the Settings node's actual values.

CategoryJPS Nodes/Pipes

Inputs (1)

NameTypeDefaultDescription
imageprepare_settingsBASIC_PIPE

Outputs (10)

NameTypeDescription
resize_toINT
offset_widthINT
offset_heightINT
crop_leftINT
crop_rightINT
crop_topINT
crop_bottomINT
interpolationlanczos,nearest,bilinear,bicubic,area,nearest-exact
sharpeningFLOAT
flipNo,X-Axis,Y-Axis