Nodes/Allor Plugin/ImageContainerInheritanceScale
ComfyUI Node

ImageContainerInheritanceScale

A canvas scaled to your image, without resizing the image

By Nourepide·Created 3 years ago·Updated 2 years ago· 295
ImageContainerInheritanceScale
  • images
  • IMAGE
scale_width1.0
scale_height1.0
red255
green255
blue255
alpha0.00
method

ImageContainerInheritanceScale makes a blank RGBA canvas that is a multiple of your image's size. Feed it a 1024×1024 image with scale_width and scale_height set to 1.5, and you get a 1536×1536 container. It's the "give me a bigger canvas, proportionally" sibling of ImageContainerInheritanceAdd (which grows by absolute pixels).

How it works

It reads the first frame's dimensions, multiplies width and height by your two scale factors, subtracts the original size to get a delta - then literally calls ImageContainerInheritanceAdd with that delta. So it's a thin wrapper, but a handy one: you think in "2×" or "1.25×" instead of doing the arithmetic in your head.

Inputs that matter:

  • images - any IMAGE; first frame's size is the base.
  • scale_width / scale_height - multipliers, default 1.0 (no change). 2.0 doubles the canvas, 0.5 halves it. They're independent, so you can build a 2×-wide × 1×-tall canvas for side-by-side layouts.
  • red / green / blue / alpha - the container's fill. Same reminder as the rest of the family: alpha defaults to 0, so your new canvas is fully transparent until you raise it.
  • method - single returns one container; for_each returns a batch matching your input batch, all the same size, ready for pair-mode compositing.

Because it inherits from the input image, the canvas always tracks your content: change the source resolution and the container follows. That's the whole appeal versus hardcoding a width/height in ImageContainer.

Where it sits in a workflow

Pair it with the composite nodes. Common pattern: generate a layer, scale a container to 1.25×, then use ImageCompositeRelative with the percentage offsets to center the original image inside the oversized canvas. Or use ByContainer composite/draw nodes, which take their canvas size from an image input - this node is a clean way to supply one sized relative to your actual content.

Installing Allor

This ships in the Allor Plugin (Nourepide/ComfyUI-Allor), a ~90-node image-processing pack from early 2024. Install once, get the whole family:

cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor
cd ComfyUI-Allor
pip install -r requirements.txt

Restart, or search "Allor Plugin" in ComfyUI Manager and install there - the route most people use, and the more reliable one with this pack (early Reddit threads about Allor are mostly manual-install import errors; reinstall via Manager was the repeated fix). Dependencies are just rembg + onnx for the pack's segmentation side; no models needed here.

Gotchas that apply to the whole pack

The repo was rebased to drop images from history (shrank ~344×), so auto-update can occasionally break - the README points at its update-troubleshooting docs, and delete-and-reclone is the blunt fix. And don't be alarmed by [Allor] console lines at startup: that's the pack writing config.json and checking for updates.

Categoryimage/container

Inputs (8)

NameTypeDefaultDescription
imagesIMAGE
scale_widthFLOAT1.0
scale_heightFLOAT1.0
redINT255
greenINT255
blueINT255
alphaFLOAT0.00
methodCOMBO2 options: single, for_each

Outputs (1)

NameTypeDescription
IMAGEIMAGE