crop image 剪裁图片
Cut an image to a region on the canvas, no numeric boxes
- image
- image
Crop is one of those operations that looks trivial until you're doing it a hundred times in a row. This node takes an image and returns the cropped piece, and the way it differs from core ComfyUI's ImageCrop is the point: the info_schema exposes only an image in and an image out - there are no x, y, width, height widgets. The crop region is defined on the node itself, on the image, rather than by typing four numbers into text fields.
That's the appeal, and it's also the honest thing to flag: it's a visual, interactive crop. You pick the box by interacting with the image preview on the node, which is much faster than dialing in pixel coordinates - and much harder to replicate in a written guide, because the interaction lives in the pack's front-end rather than in the node's input schema. If your workflow is about eyeballing a subject and cropping tight around it, that's a genuinely nicer workflow than four number boxes.
When would you reach for it? Cropping a face or a product out of a larger shot before feeding it to an img2img or an inpainting pass is the classic case. The inpainting community's whole playbook leans on "crop the region, edit it, stitch it back" - this node is the front half of that pattern. It's also an output node, so you can run the graph and treat the crop as a terminal preview while you dial the region in.
The pragmatic caveat: if you're doing programmatic, repeatable crops - the same rectangle on every image in a batch - you actually want the core ImageCrop with its numeric inputs, because a visual crop isn't reproducible in automation. This node is for the human-in-the-loop pass.
Installing it
Part of AI2lab/comfyUI-tool-2lab. ComfyUI Manager → search "comfyUI-tool-2lab" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/AI2lab/comfyUI-tool-2lab
Restart ComfyUI. No model downloads, no heavy dependencies - this is local image math.
Common issues
The main "issue" is discoverability: because the crop box isn't a set of widgets in the schema, you have to find the interaction on the node preview to change the region. If the node seems stuck cropping the same area no matter what you do, that's the interface, not a bug. And because there are no numeric inputs, there's no way to type in an exact region - if you need pixel-perfect reproducibility across a batch, this isn't the tool, and core ImageCrop is. The pack's documentation is a thin Chinese README with no English community, so the interaction details here are genuinely best learned by poking the node - which, for a crop tool, is exactly how you'd want to learn it anyway.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |