Image Crop + Rotate + Pad π
A crop, rotate, and pad tool that feels like an editor, not a widget farm
- image
- mask
The standard ComfyUI way to crop an image is a cascade of nodes: crop, rotate, pad, then a mask if you're going to inpaint the seams. Image Crop + Rotate + Pad π collapses that whole stack into one Load Image-style node with a live preview - and the preview is actually usable, which is rarer than it should be.
The node shows the transformed image directly on the canvas. Drag the cyan crop handles, the four orange padding handles, or the green rotation knob, and the preview is the live stage. When you need precision, the Open editor button opens a full-screen editor with zoom, pan, and a numeric sidebar. Eight crop handles with generous hit targets, free or ratio-locked crop, Shift snapping to 15 degrees on rotation, mouse-wheel zoom, middle-mouse or Alt-drag pan. It's the sort of editing surface you'd expect from a standalone tool, not a graph node.
What it outputs
Two outputs, and they're the whole point:
image- the transformed BHWC batch.mask- a generated-area mask covering source transparency, rotation corners, and padding. That mask is what makes the node useful for outpainting and inpainting: wire it into an inpainter and the model knows exactly which pixels are "new" (rotation voids and padding) versus original. It's the same discipline as the transform pair in this pack - the mask marks what the sampler may touch.
Operation order is always rotate β crop β pad, and new sources start with zero rotation, full crop, zero padding, and a canvas multiple of 1. Knowing that order explains a lot of the widget behavior: rotation_degrees is applied first, then the crop is taken out of the rotated frame, then padding grows the result.
The widgets that matter
crop_aspect_ratio locks the crop handles to a ratio (source, 1:1, 9:16, 16:9, and more) - useful when you're targeting a fixed delivery format. crop_width/crop_height of 0 keep the full available dimension. feather (default 24) feathers the mask into kept pixels and fades the image edge into the fill color, which is how you avoid a hard line when you pad and inpaint. canvas_multiple rounds the output up by adding minimum extra pixels to right and bottom - the sampler-friendly-multiple trick the whole pack is built around. fill_color accepts hex, R,G,B, grayscale, or CSS names, and falls back to mid-gray if it can't parse your input.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/ausboss/ComfyUI-AusBoss.git
Restart ComfyUI and search for AusBoss (Manager: ComfyUI-AusBoss). No extra Python dependencies; minimum ComfyUI 0.27.1. Alt+E (rebindable in Settings β Keybindings) opens the editor for the selected node, and Settings β π AusBoss lets you recolor every AusBoss node in the graph.
Troubleshooting
If the mask looks like it's marking the whole image, you've got a transparency or rotation-void situation you didn't expect - the mask deliberately includes source transparency, rotation corners, and padding, not just your crop. If the editor won't open in API-mode execution, that's fine: the widgets carry the transform, so API runs work without the editor ever being open. And if a transform doesn't stick after you close the editor, check that you didn't reset it - there are Reset view, Reset padding, and Reset all controls for exactly that reason.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | Choose or upload an image from ComfyUI's input folder. | |
| rotation_degrees | FLOAT | 0.0-180β180 | Clockwise rotation applied before crop and padding. |
| crop_aspect_ratio | COMBO | free | Locks crop handles to a ratio; free allows any rectangle. |
| crop_x | INT | 00β65536 | Left edge of the crop in pixels, measured on the rotated image. |
| crop_y | INT | 00β65536 | Top edge of the crop in pixels, measured on the rotated image. |
| crop_width | INT | 00β65536 | 0 keeps the full available width. |
| crop_height | INT | 00β65536 | 0 keeps the full available height. |
| pad_left | INT | 00β32768 | Fill-color pixels added on the left; padding lands in the output mask. |
| pad_top | INT | 00β32768 | Fill-color pixels added on top; padding lands in the output mask. |
| pad_right | INT | 00β32768 | Fill-color pixels added on the right; padding lands in the output mask. |
| pad_bottom | INT | 00β32768 | Fill-color pixels added on the bottom; padding lands in the output mask. |
| feather | INT | 240β4096 | Feathers the mask into kept pixels and fades the image edge into the fill color. |
| canvas_multiple | INT | 11β4096 | Rounds output up by adding the minimum extra pixels to right and bottom. |
| fill_color | STRING | #808080 | Color for rotation voids and padding; accepts #RGB/#RRGGBB hex, R, G, B (0-255 or 0..1 floats), one grayscale number, or a CSS color name. Unparseable values fall back to mid-gray. |
| resize_to_megapixels | BOOLEAN | false | Resize the output to the megapixel budget below, aspect preserved. |
| megapixels | FLOAT | 1.000.01β16 | Output pixel budget in megapixels (x 1024x1024, matching the core Scale Image to Total Pixels node). |
| resize_method | COMBO | lanczos | Sampling filter for the resize; lanczos is the sharp default. |
| resolution_steps | INT | 11β256 | Rounds each resized dimension to a multiple of this - 8 or 64 keeps VAE-friendly sizes. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The transformed image batch in BHWC format. |
| mask | MASK | BHW generated-area mask: transparency, rotation corners, and padding. |