图像裁剪
The crop node that makes you part of the workflow
- image
- 裁剪图像
Most ComfyUI nodes run and then hand you the result. ImageCropper (图像裁剪 in the menu) is the opposite: it drops an interactive preview right into the node, lets you drag a box around whatever you want to keep, and only then lets the graph continue. It's the kind of node that makes no sense in a batch job but feels great when you're composing or prepping a reference image by hand.
It's one of the signature "interactive" nodes from LAOGOU-666's Comfyui_LG_Tools pack - the author literally pitched the pack on r/comfyui as a "real-time interactive node package" - and it works the way those always do: the graph pauses, you fiddle with the node, the graph resumes.
How it works
The mechanism is worth understanding because it explains the node's one big gotcha. When ImageCropper executes, it sends a PNG preview of your image to the frontend over ComfyUI's websocket and then blocks, waiting up to 30 seconds for you to finish. When you drag your selection and confirm, the frontend posts the cropped pixels back to the /image_cropper/apply endpoint, an internal event fires, and the node returns the crop.
Hit the 30-second limit without confirming, and it just returns the original image untouched. That's not a bug - it's the timeout working as designed - but it means this node is a poor fit for --listen API workflows or any queue where nobody is there to click.
The inputs that matter
image(IMAGE) - your input. Note that the node only previews the first frame of a batch (image[0]), so don't expect it to crop frame five of five.
That's the whole required side. The single output, 裁剪图像, is the cropped IMAGE, ready to wire into whatever eats an image.
Installing it
It ships in the Comfyui_LG_Tools pack, so you install the pack, not the node:
cd ComfyUI/custom_nodes
git clone https://github.com/LAOGOU-666/Comfyui_LG_Tools.git
pip install -r requirements.txt
ComfyUI Manager will find it if you search "Comfyui_LG_Tools". Then restart ComfyUI and grab it under Add Node → 🎈LAOGOU → Image. The requirements.txt pulls in opencv-contrib-python and transparent-background, so the first install is chunkier than the node itself looks.
Common issues
- It times out and passes the image through. You either dawdled past 30 seconds or ran it headless. There's no "wait longer" setting - re-run and click faster, or use this node only in interactive sessions.
- Nothing you can do about the Chinese labels. This whole pack is Chinese-first; the author's own reddit thread got a "wish this could be translated to english" comment and it's still true. 图像裁剪 is the crop node.
- Batch input surprises. Because only the first frame gets previewed, a batch input returns a crop of frame one with the rest of the batch silently dropped. Crop one at a time.
It's a small, fiddly utility - but for hand-composing a reference image or eyeballing a crop before it hits an img2img step, it's exactly the right tool. If you'd rather crop without the interactivity, the AFL2 mask-box-crop pair in the same pack is the batch-friendly alternative.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 裁剪图像 | IMAGE | — |