Nodes/JPS Custom Nodes for ComfyUI/Image Prepare Pipe (JPS)
ComfyUI Node

Image Prepare Pipe (JPS)

Unpack the base crop/pad/resize settings

By JPS-GER·Created 3 years ago·Updated 2 years ago· 100
Image Prepare Pipe (JPS)
  • imageprepare_settings
  • offset_width
  • offset_height
  • crop_left
  • crop_right
  • crop_top
  • crop_bottom
  • padding_left
  • padding_right
  • padding_top
  • padding_bottom
  • interpolation
  • sharpening

Pairs with Image Prepare Settings (JPS). That node bundles crop, padding, resize, and sharpen values for a single image into one wire; this one takes the bundle apart again wherever downstream you actually need the individual numbers. Same Settings/Pipe split every menu node in this pack uses.

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). Twelve outputs:

  • offset_width / offset_height (INT) - crop-position nudge.
  • crop_left / crop_right / crop_top / crop_bottom (INT) - how much to trim from each edge.
  • padding_left / padding_right / padding_top / padding_bottom (INT) - how much blank space to add on each side.
  • interpolation - the resize algorithm (lanczos, nearest, bilinear, bicubic, area, nearest-exact).
  • sharpening (FLOAT) - the post-resize sharpen amount.

This node performs none of that work itself. It's routing between your settings menu and whatever image-processing node in your graph is actually applying crop, padding, resize, and sharpen to a real IMAGE.

Where this fits day to day: any point in a graph where an image needs to be reshaped to fit a target canvas before it reaches something more specialized downstream - the source image feeding a sampler, a reference going into an adapter, a frame heading toward a ControlNet preprocessor. It's the general-purpose version; if you're specifically prepping images for InstantID's mask, pose, or source-face inputs, this pack's InstantID-specific Prepare pairs extend the same field layout with extras (resize strategy, flip, mask-channel extraction) tailored to that pipeline, and are usually the better fit there.

Installing it

Ships with the rest of 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, no extra dependencies - pure logic.

Where people get tripped up

Without an Image Prepare Settings (JPS) node upstream, there's nothing for this pipe to unpack.

The bigger landmine is shared with several of this node's InstantID-specific cousins. Image Prepare Settings (JPS) isn't the only node that outputs a BASIC_PIPE literally named imageprepare_settings - InstantID's Mask Prepare, Pose Prepare, and Source Prepare Settings nodes all do the same, because they're all built on top of this node's field layout. Since BASIC_PIPE carries no schema ComfyUI actually checks, this pipe node will happily accept a wire from any of those other Settings nodes without complaint - the name and type both match, so the connection looks correct. It won't unpack correctly, though: this pipe only knows about twelve fields, while (for instance) InstantID Mask Prepare Settings packs in fifteen (extra mask_type, resize_to, resize_type fields up front), so the positions get misread and every output past that point comes out wrong. If your crop/pad/interpolation values look nonsensical after unpacking, trace the imageprepare_settings wire back to its actual source before assuming the numbers in the Settings node are the problem - there's a decent chance it's plugged into the wrong Settings node entirely.

CategoryJPS Nodes/Pipes

Inputs (1)

NameTypeDefaultDescription
imageprepare_settingsBASIC_PIPE

Outputs (12)

NameTypeDescription
offset_widthINT
offset_heightINT
crop_leftINT
crop_rightINT
crop_topINT
crop_bottomINT
padding_leftINT
padding_rightINT
padding_topINT
padding_bottomINT
interpolationlanczos,nearest,bilinear,bicubic,area,nearest-exact
sharpeningFLOAT