Nodes/was-node-suite-comfyui/Image Crop Square Location
ComfyUI Node Runs on cloud

Image Crop Square Location

Crop a perfect square around a center point

By WASasquatch·Created 3 years ago·Updated about a year ago· 1,812
Image Crop Square Location

      Per WAS's own description, this node crops "a location by X/Y center, creating a square crop around that point." You're not specifying four edges the way you would with the pack's plainer Image Crop Location, and you're not relying on face detection the way Image Crop Face does - you give it a single center coordinate and a size, and it builds a square outward from that point, evenly in every direction.

      Why a square, specifically

      Squares matter for a specific reason: they're the format most avatar systems, thumbnail grids, and a lot of training pipelines actually want. A generic rectangular crop needs a second decision - how do you fit a non-square image into a square slot - and this node skips that step entirely by only ever producing squares in the first place. If you know roughly where your subject sits (a face, a product, a focal point you calculated elsewhere in the graph) and you want a clean square around it without fussing over aspect ratio, this is the more direct tool than doing the math yourself with the plain crop node.

      The inputs and outputs that matter

      Conceptually: an image in, an X/Y center point, a size for the square, and a cropped square image out. The center point is what makes this different from edge-based cropping - get that point roughly right and the node handles making a symmetric square around it; get it wrong and the crop is centered on the wrong thing entirely, since there's no auto-detection here doing the centering for you.

      How to install it

      Bundled with the full WAS Node Suite pack:

      • ComfyUI Manager - search "WAS Node Suite", install, restart.
      • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui, then pip install -r requirements.txt from inside that folder (portable: python_embeded\python.exe -s -m pip install -r requirements.txt), restart ComfyUI.

      Plain pixel math, no model download for this node.

      Common issues & troubleshooting

      The crop runs off the edge of the image. Center the square too close to a corner or an edge relative to its size, and part of the requested square simply doesn't exist in the source image. Depending on how the node handles that, you'll either get an image smaller than the size you asked for or padding filling the gap - either way, if your output size looks off, check whether your center point plus half your requested size actually fits inside the original image's dimensions.

      Wrong subject entirely. Since there's no detection step, a center point that's stale - calculated for a differently-sized or differently-cropped upstream image - will center the square on the wrong spot. If you're feeding the coordinates in from another node rather than typing them by hand, make sure they're measured against the same image this node is actually cropping.

      The pack-wide caveat still applies here too: WAS Node Suite has been unmaintained since December 2023, and the recurring gotcha is the whole suite throwing an "Import Failed" after a ComfyUI update from a dependency-version clash. Reinstall requirements.txt against the right Python environment if that happens - this node itself is a simple, stable crop.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs