Ino Crop Image By Box
Crop a square around any point, not just the center
- image
- image
Stock ComfyUI gives you a center-crop and not much else, so the moment you want to crop around a specific pixel - a face you detected, an object your mask pipeline found, a point an upscaler handed you - you're either writing math nodes or switching tools. Ino Crop Image By Box is the low-friction answer: give it a point and it cuts a square around it, with two sliders that decide exactly how that square sits.
It comes from the Ino Nodes pack, a set of utility nodes built on ComfyUI's newer V3 schema. This one lives in the image helper category and is about as simple as the pack gets: one image in, one image out.
How it works
The mechanism is worth understanding because it explains the sliders. The crop is always square, sized to the shorter side of your image (min(width, height)). The x and y inputs are the anchor point - the thing you want centered. Then shift_x and shift_y (each 0–1, default 0.5) slide the square around that anchor:
- At 0.5 (default) the square is centered on your
x, ypoint. - At 0 the square's edge sits at the point; at 1 the far edge does.
In other words, shift is "how much of the crop extends past the anchor," and the default 0.5 is a plain centered crop. The source clamps everything to the image bounds, so if your point is near the edge you get the closest valid crop rather than a crash or black bars.
Inputs to set:
- x, y - the anchor pixel, integers 0–10000.
- shift_x, shift_y - crop placement around the anchor, 0–1 with 0.1 steps. Leave at 0.5 unless you want an off-center crop.
Output is a single image tensor, sized square, ready to feed a sampler, an upscaler, a face fixer, or whatever's next in the graph.
Why you'd actually reach for it
The realistic use is face or subject cropping. Chain a face detector to this node, feed it the detection coordinates, and you've got a clean square crop for a close-up pass or an inpaint without touching pixel math. Because the output is a standard IMAGE it plugs straight into anything - no special adapters.
One honest caveat: nothing here resizes. You get a square crop at the source image's resolution, so a 1024×1024 crop out of a 1024×2048 image is exactly that, no scaling. If you want the crop scaled to a target size, throw a resize node after it.
Installing it
It ships with the whole Ino Nodes pack, so install once and this node is just there. ComfyUI Manager: search "ComfyUI Ino Nodes", install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/nobandegani/ComfyUI-InoNodes.git
cd comfyui_ino_nodes
pip install -r requirements.txt
Restart ComfyUI after. Worth flagging before you do: the pack is all-in on ComfyUI's V3 node schema and the README calls for ComfyUI v0.18.1+, so an older install will show no nodes at all. The dependency that matters is inopyutils - the author's own helper library that every node imports - so let requirements.txt install it.
Common issues
If your crop keeps hugging the wrong corner, check your shift values first - that's what they control. And remember the anchor is in pixels from the top-left, so if your detector returns normalized 0–1 coordinates you need to multiply them by width/height before wiring them in; this node takes raw pixel ints. Search "Ino Crop Image By Box" in the node menu to find it (the pack groups it under InoImageHelper).
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| x | INT | 00–10000 | — |
| y | INT | 00–10000 | — |
| shift_x | FLOAT | 0.50–1 | — |
| shift_y | FLOAT | 0.50–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |