Load and Crop Image
Pick your reference without leaving the node
- image
- x
- y
- width
- height
Every img2img workflow starts the same way: load an image, then crop it, then feed the crop somewhere, and if you've done it three times you're already tired of the two-node dance. Load and Crop collapses it into one node with an interactive crop box drawn directly on the image inside the node. Drag the corners, hit queue, and the cropped pixels come out the other side along with the crop coordinates as numbers you can actually use.
The mechanism is a frontend widget backed by a small REST API the pack registers. The node lists images from ComfyUI's input (and output) folders with a built-in browser, and when you pick one it loads a preview onto the node itself. Your crop rectangle - draggable, resizable from edges and corners - is serialized into a hidden crop_data widget and restored when you reload the workflow, so the crop you set survives a restart. On execution, the backend loads the file and cuts the region you defined.
The inputs and outputs
The image input is a file picker - the standard ComfyUI dropdown of images in your input folder, with upload support. That's the only visible input; everything else is handled on the node's canvas.
Outputs are where it gets useful, because it doesn't just hand you pixels:
image- the cropped IMAGE.x,y- the top-left corner of the crop in the original.width,height- the crop size.
Those four numbers matter. They let you pass the crop geometry forward - wire them into a paste/composite node to put a generation back exactly where it came from, or into math nodes to compute a padding offset. If you're doing crop-edit-paste workflows (the classic way to fix a face or a hand region), having the coordinates as first-class outputs saves you re-deriving them by hand.
Where it fits
This is the manual, human-in-the-loop version of the region work that the detailer/masker ecosystem automates. It's the right tool when you want to choose the region - "crop the top-left third of this reference," "isolate this person for a ControlNet pass." It also handles multi-frame inputs (GIF-style sequences) by keeping only same-size frames, and it respects EXIF rotation. It can even read from the output folder, which is handy for grabbing your last generation without leaving the node.
Install
Part of Steaked-nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/StealthNinja1O1/Steaked-nodes
Restart ComfyUI, or install via ComfyUI Manager (search "Steaked-nodes"). No extra dependencies or model files - torch, numpy, Pillow only.
Common issues
If the preview doesn't show, check that the image is in the input folder the browser is pointed at (it defaults to input, but you can switch to output). Crops restore from the saved crop_data, so if you move the node between workflows without the data, you get the full uncropped image - which is the safe default but a surprise if you expected your crop. And note it's a crop, not a resize: if your crop region lands on non-integer geometry the output just uses it as-is, so keep your workflow resolutions in mind when you set the box.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| x | INT | — |
| y | INT | — |
| width | INT | — |
| height | INT | — |