𝙆 Image Cropper
The other half of KayTool's composite-then-split pattern
- image_composer_data
- image
- mask
- IMAGE
- MASK
This node is useless on its own, and that's fine - it's designed to be the second half of a pair. Image Composer, elsewhere in this pack, glues two images (a and b) together into one canvas and outputs a DATA blob recording exactly where each one landed. Image Cropper takes that DATA plus the composited image and slices back out just the one you ask for.
Why would you composite two images just to crop them apart again? The usual reason is running a single model pass over both at once - some upscalers, style transfers, or color-matching steps behave more consistently (or are just cheaper) applied to one combined image than two separate calls - then you need to split the result back into its two original pieces afterward. If you've ever manually stitched two images into a canvas, run something across the whole thing, then eyeballed crop coordinates to pull them apart again, this pair automates exactly that, without you tracking pixel offsets by hand.
How it works
The image_composer_data input is the position data Image Composer produced - it's what tells this node where the seam is. You also feed it the (possibly-processed) composited image, and pick target: a or target: b to say which half you want back. An optional mask input lets you crop a mask the same way, in case you ran mask operations on the combined canvas too and need it split to match.
The inputs and outputs that matter
- image_composer_data (DATA) - required, and it has to come from
Image Composer. There's no manual way to construct this. - image (IMAGE) - the composited image (or its processed version) to crop from.
- target (choice: a / b) - which of the two original images to extract.
- mask (optional, MASK) - crop a mask the same way, if you have one.
- IMAGE / MASK (outputs) - the cropped-out piece and its matching mask.
Installing it
Comes bundled with the full KayTool pack - no standalone install. ComfyUI Manager: search KayTool, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/kk8bit/KayTool, restart.
Common issues
The single most likely mistake is trying to use this node without Image Composer upstream - the image_composer_data input has no manual substitute, so if you're not running the pair together, this node has nothing useful to do. If the crop comes out misaligned or the wrong size, double-check you're feeding the same composited image (or one that hasn't changed dimensions) that Image Composer originally produced - any resize or crop applied between the two nodes will throw off the position data, since it was calculated against the original canvas size. And if you only need one of the two images back and never touch the composite in between, it's worth asking whether you needed to composite at all - for a simple two-image workflow with no shared processing step, it's often simpler to just keep the images on separate wires the whole time.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image_composer_data | DATA | — | |
| image | IMAGE | — | |
| target | COMBO | a | 2 options: a, b |
| maskopt | MASK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |