Nodes/comfyui_bmab/BMAB Zoom Out
ComfyUI Node

BMAB Zoom Out

Shrink your image onto a bigger canvas and fill the border

By portu-sim·Created 2 years ago·Updated 8 months ago· 124
BMAB Zoom Out
  • bind
  • image
  • BMAB bind
  • image
steps20
cfg_scale8.0
sampler_name
scheduler
denoise0.50
method
alignment
ratio1.25
dilation30
control_net_name

The name describes it exactly: this node pulls the "camera" back. It takes your generated image, places it smaller within a larger canvas at a ratio and alignment you choose, and then has to invent what goes in the new empty border. That's really an outpainting operation wearing a resize node's name - the same underlying problem the KB's outpainting section covers (there's nothing outside the extension area to protect, so the whole job is generating plausible new content that reads as continuous with the original), just packaged as a single BMAB node with a method picker instead of a manual mask-and-inpaint chain.

The four fill methods

The method input is the whole decision here:

  • stretching - cheapest option, just stretches the edge pixels outward. Fast, looks obviously stretched if you look closely, fine for a quick composition change or when the border area barely shows.
  • inpaint - a real generative fill using your sampler settings (steps, cfg_scale, sampler_name, scheduler, denoise). This is the default choice for anything that needs to look intentional.
  • inpaint+lama - runs LaMa (a dedicated object-removal/inpainting model) as a first pass before the generative inpaint, generally cleaner for structured backgrounds since LaMa is specifically trained to extend coherent texture rather than hallucinate detail.
  • controlnet - guides the fill using a ControlNet model, picked via control_net_name. Worth knowing: that dropdown ships empty (BMAB doesn't bundle a ControlNet checkpoint), so this method only works once you've got a compatible ControlNet model already loaded elsewhere in your ComfyUI setup for BMAB to list.

The rest of the inputs

  • alignment - where your original image sits on the new canvas: center, or any of the eight edge/corner positions. Off-center alignments are how you get "camera panned to reveal more of one side" instead of a symmetric zoom-out.
  • ratio (1-2, default 1.25) - how much bigger the new canvas is relative to the original. 1.25 adds a modest 25% border; push toward 2 for a dramatic reveal.
  • dilation - how far the fill blends into the original image at the seam, same idea as mask-blur padding in a manual inpaint.

Like the rest of BMAB's pipeline nodes, this one takes and returns a bind (the model/clip/vae/seed bundle from a BMAB Integrator node), with an optional image input if you want to feed something other than what's already in the bind. Output is the updated bind plus the extended image.

Installing it

ComfyUI Manager: search comfyui_bmab, install, restart. By hand:

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

The inpaint+lama method depends on LaMa support, and the controlnet method depends on a ControlNet model being available - both are reasons the README also asks you to install comfyui_controlnet_aux (Fannovel16) and ComfyUI_IPAdapter_plus (cubiq) alongside this pack, following the same clone-and-pip-install steps.

Common gotchas

The biggest one is picking controlnet as the method and getting nothing, because control_net_name has no entries - that's not a bug, it just means BMAB found no ControlNet checkpoint to offer. Load one elsewhere in your workflow first (or just use inpaint instead, which needs nothing extra). The second: a ratio pushed high with stretching as the method produces an obviously artificial border, since stretching degrades fast the further it has to reach - past about 1.5 you generally want one of the inpaint methods instead. And as with any outpaint, thin dilation plus a high denoise on inpaint tends to leave a visible seam where old and new content meet; if you see a hard edge, raise dilation before you touch anything else.

CategoryBMAB/resize

Inputs (12)

NameTypeDefaultDescription
bindBMAB bind
stepsINT200–10000
cfg_scaleFLOAT8.00–100
sampler_nameCOMBO45 options: Use same sampler, euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, +39
schedulerCOMBO10 options: Use same scheduler, simple, sgm_uniform, karras, exponential, ddim_uniform, +4
denoiseFLOAT0.500–1
methodCOMBO4 options: stretching, inpaint, inpaint+lama, controlnet
alignmentCOMBO9 options: bottom, top, top-right, right, bottom-right, bottom-left, +3
ratioFLOAT1.251–2
dilationINT304–128
control_net_nameCOMBO0 options:
imageoptIMAGE

Outputs (2)

NameTypeDescription
BMAB bindBMAB bind
imageIMAGE