Nodes/WAS Node Suite v3/Image Crop Location
ComfyUI Node Runs on cloud

Image Crop Location

Crop to exact pixel coordinates

By WASasquatch·Created 3 years ago·Updated 5 days ago· 1,844
Image Crop Location
  • image
  • IMAGE
  • CROP_DATA
top0
left0
right256
bottom256
divisible_by8

This is the "you already know the exact numbers" crop node. Per WAS's own description, it crops an image to a specified location using top, left, right, and bottom pixel coordinates relative to the image's dimensions - no detection, no auto-centering, just literal edges you define. Compare that to the pack's other crop nodes: Crop Square Location centers on an X/Y point and squares the result, and the Mask Crop Region family crops to whatever a mask's bounding box happens to be. This one is for when you already know precisely what rectangle you want.

Where it actually gets used

Anywhere you're cutting a known, fixed sub-region out of a larger canvas: trimming a consistent border or watermark strip off a batch of source images that all share the same dimensions, splitting a canvas into predictable tiles for a tiled workflow, or isolating a region you calculated elsewhere in the graph (say, from a detection node's bounding box) rather than one you're typing by hand.

One thing worth internalizing early: the four values are distances from each edge of the image - top, left, right, bottom - not a width/height-plus-origin pair the way some crop tools work. It's an easy thing to get backwards the first time you use it, so if your crop comes out in the wrong place or the wrong size, double-check you're not accidentally treating "right" as a width.

How it pairs with Image Paste Crop

This node is the "before" half of a two-step pattern WAS documents explicitly: crop out a region, do something to it - upscale it, run a second sampling pass, retouch it - and then use Image Paste Crop to put the modified patch back exactly where it came from. The README names Image Crop Location directly as a typical source for the crop_data that Paste Crop needs, so beyond the cropped image itself, this node also outputs the positional data the paste-back step depends on. If you're cropping and expect to paste the result back later, keep that output wired through rather than discarding it.

Installing 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, then restart ComfyUI.

Common issues

Coordinates that fall outside the image, or a right/bottom edge that ends up smaller than the left/top edge, will produce an empty or invalid crop rather than something usable - worth a sanity check on your numbers, especially if they're computed by another node rather than typed by hand. And if you're pairing this with Image Paste Crop later, make sure the crop_data you're using actually came from this same crop, on this same image - mixing it up with data from a different crop will paste the patch in the wrong place.

The pack-wide caveat still applies: WAS Node Suite has been unmaintained since December 2023, and "Import Failed" errors after a ComfyUI update are a real, recurring issue tied to older pinned dependencies. Reinstalling requirements.txt inside your ComfyUI venv is the usual fix if the whole suite stops loading.

CategoryWAS Suite/Image/Process

Inputs (6)

NameTypeDefaultDescription
imageIMAGEThe image to crop. A batch is cropped frame by frame to the same rectangle and comes back the same length.
topINT00–10000000Distance in pixels from the top of the image to the top of the crop.
leftINT00–10000000Distance in pixels from the left of the image to the left of the crop.
rightINT2560–10000000Position of the crop's right edge, in pixels from the left of the image. left 0 with right 256 gives a crop 256 pixels wide. A value past the image edge is trimmed to it.
bottomINT2560–10000000Position of the crop's bottom edge, in pixels from the top of the image. A value past the image edge is trimmed to it.
divisible_byINT81–64Rounds the crop down to a multiple of this on both axes, which resamples it. 8 suits most latent models; 1 takes the exact rectangle away untouched.

Outputs (2)

NameTypeDescription
IMAGEIMAGEThe cropped region, its width and height rounded down to a multiple of divisible_by, with a side shorter than that taken up to one whole step instead. At a divisible_by of 1 it is the exact rectangle asked for, carried through without resampling.
CROP_DATACROP_DATAThe crop window, for Image Paste Crop to put the result back in the right place at the right size.