Nodes/ikki Pack/Load & Crop
ComfyUI Node

Load & Crop

Load an image and cut it to size in one node, with a visual crop box

By RedsAnalysis·Created 2 months ago·Updated about a month ago· 0
Load & Crop
    • CROP_PIECE
    • IMAGE_WITH_HOLE
    image
    x0.0
    y0.0
    width512
    height512

    The Load & Crop node does exactly what the name says: load an image from your input folder and crop it by position and size in a single step. If you've ever loaded a big reference, cropped it in an editor, re-saved it, and then fed it to ComfyUI, this removes that detour - plus it gives you two outputs that make it genuinely handy for dataset work and upscaling pipelines.

    The trick that separates it from a plain Load Image + crop combo is the visual crop box. The frontend overlays the actual image on the node and lets you drag the crop rectangle by hand - set the corner, pull it to size - and the x/y/width/height values update to match. That's the difference between fiddling with four numbers blind and pointing at what you want.

    Inputs and outputs

    • image - a dropdown of files in your ComfyUI/input folder, with an upload button, just like Load Image.
    • x and y (percent, 0–100) - the crop's top-left corner, expressed as a percentage of the image width/height rather than raw pixels. So x=25 on a 1024px image starts the crop at 256px. This makes crops behave predictably across differently-sized inputs, which is why the values feel weird at first.
    • width and height (pixels, 8–8192) - the crop size. Defaults to 512×512.

    Two outputs, and both are the point:

    • CROP_PIECE - the cropped region, ready to feed a sampler, a tile upscaler, or a ControlNet preprocessor.
    • IMAGE_WITH_HOLE - the original image with the crop region zeroed out (black). That's a dataset/preprocessing workhorse: mask the crop with a threshold and you've got an inpaint training pair, or use the hole to composite the refined piece back in later.

    Where it fits

    The README's own pitch is dataset preparation and "creating consistent image sizes" - and that's the honest use. For tile-based upscaling (the multidiffusion/tile-ControlNet world the KB's upscaling essay covers), splitting a source into consistent tiles is a recurring chore, and a node that gives you both the tile and the hole in one pass slots into that cleanly. The crop is clamped to the image bounds, so pushing the box off the edge just gives you a smaller piece rather than an error.

    Install

    Via ComfyUI Manager (search "ikki") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/RedsAnalysis/comfyui-ikki-pack
    # restart ComfyUI
    

    No extra dependencies.

    Small print

    • x/y are percentages, width/height are pixels. Mixing units is easy to forget when you're mid-workflow; if your crop lands somewhere unexpected, that's usually why.
    • It operates on the first image of a batch - it's a single-image loader, not a batch cropper.
    • The crop box preview needs the frontend extension (it's in the pack's web/ folder). If the overlay isn't showing, the node still works - you'll just be setting the four numbers by hand.
    • It's a young pack, so the README documents this node properly but the rest of the pack is thinner on docs. This one behaves.

    If all you need is "cut this image to 512×512 at this spot," a Load Image + Crop node combo does it. Reach for this when you want the visual box, or when the hole output saves you a step in a dataset or inpaint-prep workflow.

    CategoryIkkiPack/Crop

    Inputs (5)

    NameTypeDefaultDescription
    imageCOMBO1 options: example.png
    xFLOAT0.00–100
    yFLOAT0.00–100
    widthINT5128–8192
    heightINT5128–8192

    Outputs (2)

    NameTypeDescription
    CROP_PIECEIMAGE
    IMAGE_WITH_HOLEIMAGE