Nodes/Orion4D_layer_manager/Interactive Crop
ComfyUI Node

Interactive Crop

Stop guessing crop coordinates — actually see your crop

By orion4d·Created about a month ago·Updated about a month ago· 2
Interactive Crop
  • image
  • cropped_image
  • output_width
  • output_height
  • output_x
  • output_y
  • crop_width
  • crop_height
scale_multiplier1.0
x0
y0
width512
height512
aspect_ratioFree

Cropping in ComfyUI is usually a blind numbers game. You type an x, a y, a width and a height into a widget, run the graph, and discover you've lopped off the subject's ear. Interactive Crop fixes the stupid part of that: instead of punching in pixels, you drag a crop box around a real preview of the image in a small pop-up editor, then hit Apply. It's one of the five nodes in the Orion4D Layer Manager pack, and if you're doing any kind of compositing in the graph, it's the one to start with.

How it works

The pack's whole design is "lightweight node, heavy editor." The ComfyUI node itself just holds an image input and the crop settings - the actual cropping happens in a separate app window that opens when you click Open App. You drag the crop region, resize it with the four corner handles, or nudge the X/Y/Width/Height sliders, and the settings get serialized back into the node even though the technical widgets stay hidden. The Python backend stays the reference for what actually comes out, so the preview is fast and honest.

One detail worth knowing: the backend clamps. The crop code bounds your x/y to the source image and shrinks width/height if they'd run past the edge, then applies the aspect ratio. So you can't silently produce an out-of-bounds crop - if you set a 2000px box on a 1024px image, you get the biggest legal version, not an error.

The inputs that matter

  • image - required, the IMAGE you're cropping.
  • scale_multiplier - the sneaky one. Default 1.0 keeps the crop at source size. Turn it up and the cropped image and every returned coordinate get scaled together, so an Interactive Crop → Paste Cropped Image pipeline stays in sync even when you're working at 2x. That pairing is the intended workflow.
  • x, y, width, height - crop position and size in source pixels. You'll rarely touch these if you're using the app; they're there so the state survives serialization and so power users can drive the crop numerically.
  • aspect_ratio - 56 presets from "Free" through classic 1:1, 2:3, 4:5 and more. Pick one in the app and the handles snap to it.

Outputs

cropped_image (IMAGE) is the obvious one - feed it into your next processing node or into Paste Cropped Image. Then you get a stack of INTs: output_width, output_height, output_x, output_y, plus crop_width and crop_height. Those two groups are the answer to "where on the source does this crop live, at what size" - the first pair is the whole source scaled, the second is the crop box itself. Wire them into Paste Cropped Image's x/y/canvas inputs and your cutout lands back on the canvas exactly where you cut it.

The author describes this as "Nodes 2.0 compatible," and that's not marketing noise. The Nodes 2.0 frontend rewrite broke plenty of legacy custom nodes (rgthree's included - see the ecosystem writeup). A node that keeps its preview logic out of the canvas DOM is one less thing to break when ComfyUI's frontend shifts again.

Install

Same story as the rest of the pack - no model downloads, no heavy dependencies, just NumPy/Pillow/PyTorch that a stock ComfyUI already ships:

cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/Orion4D_layer_manager

Restart ComfyUI. Or skip the terminal: ComfyUI Manager → "Install Custom Nodes" → search Orion4D_layer_manager → install → restart.

Common issues

  • The app window won't open. Your browser is blocking the pop-up. Allow pop-ups for your local ComfyUI address (localhost:8188 or whatever port you run) and try again.
  • No preview in the editor. The app can only auto-display an image if the upstream node exposes one. Feed it from a Load Image / preview-capable node rather than something that only spits out a latent.
  • Crop isn't what the preview showed. A workflow run is required before some nodes push a current preview, so hit Run once before trusting the visual.
CategoryOrion4D_Layer

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
scale_multiplierFLOAT1.00.1–10Scales the cropped image and returned coordinates. 1.0 keeps the crop at source size.
xINT00–16384Crop X position in source image pixels.
yINT00–16384Crop Y position in source image pixels.
widthINT5121–16384Crop width in source image pixels.
heightINT5121–16384Crop height in source image pixels.
aspect_ratioCOMBOFreeInteractive crop ratio. The backend also clamps the crop safely.

Outputs (7)

NameTypeDescription
cropped_imageIMAGE
output_widthINT
output_heightINT
output_xINT
output_yINT
crop_widthINT
crop_heightINT