Nodes/ComfyUI-Majoor-ImageOps/〽️ Image Ops Crop
ComfyUI Node

〽️ Image Ops Crop

Crop by dragging, not by typing — an interactive Resize/Crop with the math handled

By MajoorWaldi·Created 8 months ago·Updated 8 days ago· 11
〽️ Image Ops Crop
  • image
  • mask
  • image
  • mask
bypassfalse
aspect_ratio1:1
width1024
height1024
sync_dimensionstrue
crop_center_x0.500
crop_center_y0.500
crop_scale1.000

ImageOps Resize/Crop is the node that makes reframing feel like a design tool instead of a guessing game. You pick an aspect ratio, drag the crop box on the live preview, and it resizes and crops in one step - with the crop window and output size kept in sync so you don't end up with a distorted image because you typed a width that didn't match the ratio. It's from the ComfyUI-Majoor-ImageOps pack, and it was one of the nodes people called out as most useful when the pack launched.

How it works

aspect_ratio gives you presets (1:1, 3:4, 4:3, 16:9, 9:16, custom) that constrain the crop window to the format you want. width and height set the output size (1–8192); with sync_dimensions on (default), changing one derives the other to keep the ratio honest - turn it off only when you genuinely want a non-constrained resize. Then crop_center_x / crop_center_y (0–1, default 0.5 = center) and crop_scale (0.05–1.0) position and zoom the crop box. All of these are draggable in the live preview - move the box, watch the numbers update.

The practical upshot: you can reformat a 1024×1024 square to 16:9 for a video, or to 9:16 for a vertical social post, and keep the important part of the frame by dragging the crop window instead of hoping a center-crop doesn't chop someone's head off.

The outputs people overlook

Besides image and mask, it returns width and height as INTs (feed them to other nodes that need dimensions) and crop_mask - a source-space mask of exactly which region of the original image was kept. That mask is the bridge to ImageOps Crop Stitch: send the original plus your edited crop (plus crop_mask) to the stitch node and it pastes the edited result back into the original frame, preserving the surrounding context. That pair is the real workflow: crop tight to fix or regenerate a region, then stitch it back so nothing else moves.

There's also imageops_crop_bbox metadata attached to the output in source-image coordinates - that's for UI overlays and extensions, so you don't need to touch it as a beginner.

Install

ComfyUI Manager (search "ComfyUI-Majoor-ImageOps"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/MajoorWaldi/ComfyUI-Majoor-ImageOps

Restart and hard-refresh the browser (Ctrl+F5 / Cmd+Shift+R). No models, no extra deps.

Where it gets fiddly

The trap: forget sync_dimensions and type a width that fights the aspect ratio - you get a crop box that doesn't match the ratio and confusion about why it's not square. Leave it on until you mean otherwise. Second: crop_scale zooms the crop window, so dropping it below 1.0 crops tighter rather than zooming the output. And because it's batch-first, a whole video batch crops and resizes in one pass - which is exactly what you want when reformatting an animation, but it also means a bad crop setting nukes every frame at once, so preview first.

Categoryimage/imageops

Inputs (10)

NameTypeDefaultDescription
bypassBOOLEANfalse
aspect_ratioCOMBO1:16 options: custom, 1:1, 3:4, 4:3, 16:9, 9:16
widthINT10241–8192
heightINT10241–8192
sync_dimensionsBOOLEANtrue
crop_center_xFLOAT0.5000–1
crop_center_yFLOAT0.5000–1
crop_scaleFLOAT1.0000.05–1
imageoptIMAGE,VIDEOImages/Video input. Accepts IMAGE batches and VIDEO frame sources.
maskoptMASKOptional mask to crop with the image using identical geometry.

Outputs (2)

NameTypeDescription
imageIMAGE
maskMASK