Nodes/ComfyUI-Pixaroma/Image Crop Pixaroma
ComfyUI Node

Image Crop Pixaroma

Draw the crop box instead of guessing pixel coordinates

By pixaroma·Created 5 months ago·Updated 4 days ago· 357
Image Crop Pixaroma
  • image
  • mask
  • image
  • mask
  • crop_info
  • width
  • height

Cropping in stock ComfyUI means typing x, y, width and height and hoping you've mentally mapped pixels to the picture. Image Crop Pixaroma lets you just draw it. Open the fullscreen editor, drag a rectangle over what you want to keep, snap it to a preset ratio if you like, and the node hands you the crop plus the exact geometry you used. For "crop this face out" and "make it a square for posting," it's the difference between fiddling and done.

How it works

You have three ways to get a source image in: wire any upstream IMAGE into the image input (Load Image, VAE Decode, ControlNet output - anything), drag an image file onto the node body, or paste with Ctrl+V. The drag-and-drop and paste paths load the image directly and disconnect the upstream wire, which is the node telling you "you've taken manual control now."

The on-node panel gives you Width / Height / X / Y / Ratio / Alignment fields, and math works in the number fields (1024+512, 512*2). Pick a non-Free alignment - like Center Crop - and the crop rect recenters itself against the source automatically, so changing W or H to 512 snaps X/Y to the right offsets for you. The fullscreen editor adds the draggable rectangle with handles plus standard presets (1:1, 16:9, 9:16…) so social and video aspects stay locked.

Outputs

  • image - the cropped result.
  • mask - the crop cut from your wired mask, with the exact same box. Wire in a MASK (say, Load Image's mask output) and transparency survives the crop; with nothing wired, you get a fully-opaque mask sized to the crop unless the loaded file itself has alpha.
  • crop_info - the interesting one. It carries the original image plus where this crop came from, and feeding it into Image Uncrop Pixaroma pastes an edited version of the crop back onto the original at the exact same spot. Crop → fix/upscale/inpaint → paste back. That round-trip is the pack's answer to "edit one region without touching the rest," and it's a workflow worth building.
  • width / height - the crop's dimensions, if something downstream needs them.

The honest take

For a one-off crop, this is comfortably nicer than the native Crop node and it keeps transparency, which native cropping can silently eat. The real value shows when you pair it with Image Uncrop - crop a region, run it through whatever (upscale, recolor, background removal), paste it back with a feathered seam. That's an editing loop stock ComfyUI makes painful. It works in both the classic and the new node interface. Install:

cd ComfyUI/custom_nodes
git clone https://github.com/pixaroma/ComfyUI-Pixaroma

or ComfyUI Manager → Pixaroma → install, restart. No extra dependencies. And the pack's standing advice: crop looks off after an update, hard-refresh the browser before anything else.

Category👑 Pixaroma/✂️ Resize & Crop

Inputs (2)

NameTypeDefaultDescription
imageoptIMAGEWire any upstream IMAGE here to crop it (Load Image, VAE Decode, ControlNet output, anything). You can also drag-drop an image file onto the node body or paste one with Ctrl+V - those load the image directly and disconnect this wire.
maskoptMASKOptional. Wire a MASK here (for example Load Image's MASK output) to crop the transparency with the exact same box as the image - the result comes out the 'mask' output. Leave it unwired and the mask output is a fully-opaque mask sized to the crop (unless the loaded file itself has transparency, which is used automatically).

Outputs (5)

NameTypeDescription
imageIMAGEThe cropped image.
maskMASKThe cropped mask, cut with the exact same box as the image. Comes from the wired MASK input (or, for a dropped/pasted file, its own transparency); a fully-opaque mask sized to the crop when there is no transparency.
crop_infoPIXAROMA_CROP_INFOCrop info for Image Uncrop Pixaroma - carries the original image plus where this crop came from, so an edited crop can be pasted back onto the original at the exact same spot. Wire it into Image Uncrop Pixaroma.
widthINTCropped width in pixels.
heightINTCropped height in pixels.