Nodes/comfyui_bmab/BMAB Resize And Fill
ComfyUI Node

BMAB Resize And Fill

Pad to an exact canvas, no generation involved

By portu-sim·Created 2 years ago·Updated 8 months ago· 124
BMAB Resize And Fill
  • image
  • image
width1024
height1024
fill_black

The plainest of BMAB's resize nodes: give it a target width and height, and it fits your image into that canvas, filling any leftover space with either black or (with fill_black disabled) a different default fill. No sampler, no prompt, no model - this is geometry, not generation. That makes it the right choice when you need a precise canvas size for a downstream step (feeding a ControlNet preprocessor that expects a specific resolution, prepping an input for an API call, matching a batch's dimensions) and don't want any of BMAB's heavier resize nodes running an actual inpaint or stretch pass to get there.

The inputs and outputs that matter

  • image (required) - your source.
  • width / height (default 1024, range 0–10000) - the target canvas size.
  • fill_black (enum: disable / enable, required) - toggles what fills the new area beyond your resized image.
  • Output: image - the padded result.

How to install it

ComfyUI Manager: search comfyui_bmab. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/portu-sim/comfyui_bmab.git
cd comfyui_bmab
pip install -r requirements.txt

No extra model dependency for this specific node.

Common issues & troubleshooting

You built a workflow around this node a while back, and now you can't find it. This is a real, reported problem - a user on r/comfyui in early 2026 posted exactly this after reinstalling ComfyUI: they couldn't locate a working version of BMAB Resize and Fill for a workflow they'd used before, and the fix that actually worked for them was switching to ComfyUI core's own pad/resize node (ResizeAndPadImage, now shipped natively) instead of chasing down the BMAB version. If you're rebuilding an old workflow and this node isn't behaving the way you remember, that core node is a solid, well-maintained substitute for the same basic job - pin Load Image output straight into it and you likely don't need to fight BMAB's version at all.

The result looks stretched instead of padded. Double check you're not confusing this with BMAB Resize By Ratio or BMAB Resize By Person, both of which offer a stretching fill method as one of several options. This node only pads - it doesn't distort the source image to fit the target dimensions.

Black bars appear where you didn't want them. That's fill_black doing exactly what it's set to do. Flip it to disable if you want a different fill behavior, and if neither option gives you what you need (say, a blurred-extension fill instead of a flat color), you're better served by BMAB Reframe, which generatively fills the new canvas rather than padding it with a flat value.

CategoryBMAB/resize

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
widthINT10240–10000
heightINT10240–10000
fill_blackCOMBO2 options: disable, enable

Outputs (1)

NameTypeDescription
imageIMAGE