ImageTransformCropAbsolute
Pixel-exact cropping when percentages won't do
- images
- IMAGE
Sometimes you know exactly where the crop should be - pixel-for-pixel, because you calculated it, or because you're slicing a batch of same-size images at fixed offsets. That's what Allor's ImageTransformCropAbsolute is for: a dead-simple left/top/right/bottom crop in absolute pixels, applied to every image in the batch. No percentages to reverse-engineer, no aspect-ratio magic, just "give me the pixels from here to here."
It's part of the Allor Plugin (Nourepide/ComfyUI-Allor), the pack that keeps RGBA and multi-image batches intact through its transform family. The "Absolute" node is the mechanical sibling of ImageTransformCropRelative, which does the same job in fractions; you pick Absolute when the math in your head is in pixels.
How it works
It's a plain PIL crop([left, upper, right, lower]) per image in the batch. Four integer inputs define the box:
start_x(default 0) - left edge, in pixels.start_y(default 0) - top edge.end_x(default 128) - right edge.end_y(default 128) - bottom edge.
The box is [start_x, start_y, end_x, end_y], so output width = end_x - start_x and height = end_y - start_y. The defaults crop a 128×128 square from the top-left, which is just a placeholder - you'll set real values. Coordinates outside the image behave like standard PIL crops: a box that extends past the edge gets clamped rather than erroring, so you can safely use it for edge-slicing tricks like trimming an exact border.
The output is an IMAGE at the cropped size, alpha channel preserved, and since it operates per frame you can feed a whole batch of identically-sized images and get the same region cut out of each - which is the main reason you'd choose Absolute over Relative in a batch loop.
Inputs and outputs
images(IMAGE) - single frame or batch.start_x,start_y,end_x,end_y(INT) - the crop box in absolute pixels.
Output: IMAGE, cropped, RGBA intact. Wire it into a resize, a composite, or straight to preview/save.
Installing it
It ships in the Allor Plugin: ComfyUI Manager → search "Allor Plugin" → install → restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor
No model downloads for the transform family. The pack creates a config.json on first launch (daily auto-update on) - editable.
Where people get burned
The classic fumble is swapping the order - end_x less than start_x gives you a degenerate box (or an empty crop), and since the defaults are 0/0/128/128, forgetting to change any of them silently crops the top-left corner of everything. Another trap: batch cropping assumes all frames are the same size; if your batch has mixed dimensions, Absolute crops the same pixel box out of each and the results won't be aligned. If your crop is meant to scale with image size, use ImageTransformCropRelative instead and save yourself the per-image math.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| start_x | INT | 0 | — |
| start_y | INT | 0 | — |
| end_x | INT | 128 | — |
| end_y | INT | 128 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |