ImageTransformPaddingAbsolute
Pad by exact pixels — not percentages
- images
- IMAGE
ImageTransformPaddingAbsolute grows an image by a fixed number of pixels instead of a percentage. You give it images, tell it how many pixels to add (add_width, add_height, both default 64, min 0), pick a padding style, and out comes the same image with extra canvas around it. It's the "absolute" sibling of Allor's ImageTransformPaddingRelative, which scales padding to image size - pick this one when you want deterministic, resolution-independent padding, like bumping everything to a shared canvas size.
Why would you pad in ComfyUI? Usually for compositing and alignment. If you're stacking several images into one canvas or aligning layers that need to sit on a common base size, adding an exact number of pixels is the tool - and because this is absolute, a 512px image and a 1024px image both get exactly the same border, which relative padding won't give you. It also works batch-wide, so every image in the tensor gets identical treatment, keeping your layers consistent.
The method dropdown controls what fills the new border, and it matters more than it looks:
- reflect - mirrors the edge pixels (like the edge of a mirror). Great when you're padding before a filter or transform that would otherwise see hard black edges.
- edge - repeats the outermost pixel outward. The classic "border smear" that keeps a photo looking natural on the sides.
- constant - fills with a fixed value (black, by default).
The implementation uses torchvision's functional pad, so the mechanics are boring and reliable, and it keeps the alpha channel intact - pad an RGBA image and the transparent border stays transparent. Output is the padded IMAGE tensor, same batch count as the input.
Installing it
It ships with the Allor plugin:
cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor
cd ComfyUI-Allor
pip install -r requirements.txt
Restart ComfyUI, or search "Allor" in ComfyUI Manager. Two pack-level gotchas: the requirements.txt pulls in rembg and onnx for the segmentation nodes even though this node needs only torchvision (already present), and Allor's repo was rebased to strip images from its git history, which can make auto-updates fail - the docs at nourepide.github.io/ComfyUI-Allor-Doc have troubleshooting pages for that.
Real talk
Padding is one of those operations you don't think about until a compositing workflow demands it, and then you need it exact. This node is that. The one thing to keep straight is which sibling you're grabbing: absolute for fixed pixel borders, relative for size-proportional ones - grab the wrong one and your 512px and 2048px layers will suddenly disagree about what "the same border" means. reflect mode is the pick when the padded result is about to hit another transform; edge when you just want natural-looking photo borders.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| add_width | INT | 64 | — |
| add_height | INT | 64 | — |
| method | COMBO | 3 options: reflect, edge, constant |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |