FL Padding
Add solid-color borders to an image, precisely and per-side
- image
- IMAGE
Sometimes you need to grow a canvas without scaling anything - extend it with solid color on one or more sides, for aspect-ratio matching, outpainting prep, or just giving a downstream node room to work with. FL_Padding does exactly that: pick how many pixels to add on each side independently, pick a color, done.
How it works
Nothing fancy - it's a per-side pixel expansion with a configurable fill color, correctly handled across a batch of images (so if you feed it a batch tensor, every image in the batch gets the same padding applied, not just the first one). The four sides are fully independent: you can pad only the top, or pad left and right by different amounts, or all four evenly. There's no auto-detection here - it's the opposite job of FL_PaddingRemover, which figures out padding that already exists and strips it back off.
The inputs and outputs that matter
padding_left,padding_right,padding_top,padding_bottom(0–4096 px each) - independent per-side amounts. Set only the ones you need; the rest default to zero.red,green,blue(0–255, default 255/255/255 - white) - the fill color for the new border area.include_alpha- add an alpha channel to the output. Useful if you need the padded region to be genuinely transparent for a downstream compositing step rather than solid-colored.- Output:
IMAGE, the original image centered inside the new, larger canvas.
How to install it
Via ComfyUI Manager: search "ComfyUI_Fill-Nodes" and install, or clone manually:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
then restart ComfyUI. This is a plain image-tensor operation - no extra dependency, no model download. The pack as a whole is a large, general-purpose collection from filliptm, one prolific solo author, spanning image FX, PDF tools, GPT/Gemini/Fal API wrappers, and an entire KSampler family; this node is one of the simplest things in it.
Common issues & troubleshooting
Padded area is the wrong color for what you actually needed. If you're prepping for outpainting, a solid white or black border isn't automatically the right choice - some inpainting/outpaint pipelines expect a specific marker color or expect the padded region masked separately rather than colored at all. Check what your downstream sampler or ControlNet actually wants before assuming white is safe.
Output dimensions bigger than you expected. Remember padding is additive per side, not a target final size - 512×512 with 64px padding on all sides becomes 640×640, not 512×512 with room carved out of the original. If you need an exact final canvas size, FL_PasteOnCanvas (which centers content into a fixed-dimension canvas) is the better fit.
Alpha channel not showing up downstream. include_alpha has to be explicitly enabled - it's off by default, so a node expecting RGBA further down the chain will get RGB unless you flip this on.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| padding_left | INT | 00–4096 | — |
| padding_right | INT | 00–4096 | — |
| padding_top | INT | 00–4096 | — |
| padding_bottom | INT | 00–4096 | — |
| red | INT | 2550–255 | — |
| green | INT | 2550–255 | — |
| blue | INT | 2550–255 | — |
| include_alpha | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |