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

Image Prepare Settings (JPS)

The base crop/pad/resize/sharpen menu the rest of the pack builds on

By JPS-GER·Created 3 years ago·Updated 2 years ago· 100
Image Prepare Settings (JPS)
    • imageprepare_settings
    offset_width0
    offset_height0
    crop_left0
    crop_right0
    crop_top0
    crop_bottom0
    padding_left0
    padding_right0
    padding_top0
    padding_bottom0
    interpolation
    sharpening0.00

    This is the plain, general-purpose version of a pattern that shows up in several specialized places across this pack - InstantID's Mask Prepare, Pose Prepare, and Source Prepare Settings nodes all extend the exact same field set this node defines. Think of it as the base recipe: offset, crop from each edge, pad on each side, pick an interpolation method, sharpen a bit. No InstantID-specific extras (no mask-channel extraction, no resize-strategy enum, no flip) - just the core single-image preprocessing job, useful anywhere in a graph that a source or reference image needs reshaping before it hits a sampler, an adapter, or a preprocessor.

    The inputs that matter

    • offset_width / offset_height (-99 to 99, default 0) - nudge the crop position by a small amount in either direction.
    • crop_left / crop_right / crop_top / crop_bottom (0–90, default 0) - trim in from each edge independently, expressed as a percentage rather than raw pixels, which makes the same settings behave sensibly across images of different sizes.
    • padding_left / padding_right / padding_top / padding_bottom (0–500, default 0) - add blank space back on any side, for when the target canvas is bigger than the source and you want the image centered within it rather than stretched to fill it.
    • interpolation - lanczos, nearest, bilinear, bicubic, area, or nearest-exact. Lanczos is the safe general default for photographic content; reach for nearest specifically if what you're resizing is a hard-edged map (a mask, a segmentation output) where blending interpolation would smear values that need to stay crisp.
    • sharpening (0–1, default 0) - a mild sharpen pass after resizing, since any resize interpolation softens the result somewhat.

    Output: imageprepare_settings, typed BASIC_PIPE - JPS's own reused bundle label (a plain tuple, not Impact Pack's object of the same type name), meant to feed the matching Image Prepare Pipe (JPS).

    Installing it

    ComfyUI Manager: search JPS Custom Nodes for ComfyUI. Manually:

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

    Restart ComfyUI, removing any older copy of the pack first - the README explicitly warns that a leftover prior install causes conflicts. Pure logic node, no models to download.

    Where people get tripped up

    This node holds settings only - it doesn't crop, pad, resize, or sharpen anything itself. That happens downstream, once Image Prepare Pipe (JPS) unpacks the bundle into individual values and something else in your graph actually applies them to an image.

    The sharper gotcha is specific to how JPS names its pipes. Several other nodes in this pack - the InstantID Mask Prepare, Pose Prepare, and Source Prepare Settings nodes - output a BASIC_PIPE under the exact same name, imageprepare_settings, because they all extend this node's field layout. Since BASIC_PIPE is a generic, untyped bundle rather than something ComfyUI validates field-by-field, it's entirely possible to wire this node's output into, say, InstantID Mask Prepare Pipe (JPS) instead of its own matching Pipe node - the connection will look valid in the UI, since the name and type both match. It just won't unpack into anything sensible, because that Pipe node expects extra fields (like mask_type and resize_type) this Settings node never packed in the first place, and the mismatch shows up as garbage values or an outright error rather than a clean rejection at connection time. If a downstream unpack node is producing values that don't line up with what you set, this cross-wiring is the first thing worth checking - trace the imageprepare_settings wire back to confirm it actually originates from this node and not one of its InstantID-specific cousins.

    CategoryJPS Nodes/Settings

    Inputs (12)

    NameTypeDefaultDescription
    offset_widthINT0-99–99
    offset_heightINT0-99–99
    crop_leftINT00–90
    crop_rightINT00–90
    crop_topINT00–90
    crop_bottomINT00–90
    padding_leftINT00–500
    padding_rightINT00–500
    padding_topINT00–500
    padding_bottomINT00–500
    interpolationCOMBO6 options: lanczos, nearest, bilinear, bicubic, area, nearest-exact
    sharpeningFLOAT0.000–1

    Outputs (1)

    NameTypeDescription
    imageprepare_settingsBASIC_PIPE