Nodes/Allor Plugin/ImageDrawEllipseByContainer
ComfyUI Node

ImageDrawEllipseByContainer

An ellipse that fits an image you already have

By Nourepide·Created 3 years ago·Updated 2 years ago· 295
ImageDrawEllipseByContainer
  • container
  • IMAGE
start_x0.00
start_y0.00
end_x1.00
end_y1.00
outline_size1
outline_red0
outline_green0
outline_blue0
outline_alpha1.00
fill_red255
fill_green255
fill_blue255
fill_alpha1.00
SSAA4
method

ImageDrawEllipseByContainer is the ImageDrawEllipse you don't have to size by hand: feed it an image and it draws the ellipse at that image's exact dimensions, with the same fill/outline controls and the same anti-aliasing. It's the container-flavored version of the node, useful whenever the ellipse should track an existing image in your graph instead of a hardcoded resolution.

How it works

It reads the width and height of the first frame of the container input and forwards them into ImageDrawEllipse, which does the real work: RGBA canvas, PIL ImageDraw.ellipse inside a normalized bounding box, supersample by SSAA, downscale with method. As with all ByContainer draw nodes, the container defines size only - the ellipse is drawn on a fresh transparent canvas, so the container's pixels don't show through. If you want the ellipse on top of the container's content, draw it and composite.

Inputs that matter:

  • container - any IMAGE; its size becomes the canvas.
  • start_x / start_y, end_x / end_y - the ellipse's bounding box as 0–1 fractions of the canvas; defaults 0,0 → 1,1 span the whole thing (a square box makes a circle).
  • outline_size - outline stroke width, default 1.
  • outline_red / green / blue / alpha - outline color, default black.
  • fill_red / green / blue / alpha - fill color, default white.
  • SSAA (default 4) and method (default lanczos).

Why you'd use it

The usual container pattern: one ImageContainer (or an ImageContainerInheritance* node) drives the size of both your drawn shapes and your compositing, so the whole graphic scales together when you swap the container. A vignette disc that always exactly matches the image it's meant to sit under, for instance, without you rechecking dimensions.

The gotcha

Output is RGBA with a transparent background - the ellipse floats on a checkerboard in Preview. Great for compositing, but if you expected a solid backdrop, composite the result onto a container yourself. And don't expect the container's color to bleed through; the canvas starts as (0,0,0,0).

Installing Allor

Part of the Allor Plugin (Nourepide/ComfyUI-Allor), ~90 nodes from early 2024:

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 - the more reliable route given the pack's history of manual-install import errors (reinstall via Manager was the repeated community fix). Dependencies are rembg + onnx; drawing needs no models.

Gotchas that apply to the whole pack

The repo was rebased to strip images from history (shrank ~344×), so git pull/auto-update can occasionally break - the README's update-troubleshooting docs cover it; delete-and-reclone is the blunt fix. [Allor] console lines at startup are the pack writing config.json and checking updates, not an error.

Categoryimage/draw

Inputs (16)

NameTypeDefaultDescription
containerIMAGE
start_xFLOAT0.00
start_yFLOAT0.00
end_xFLOAT1.00
end_yFLOAT1.00
outline_sizeINT1
outline_redINT0
outline_greenINT0
outline_blueINT0
outline_alphaFLOAT1.00
fill_redINT255
fill_greenINT255
fill_blueINT255
fill_alphaFLOAT1.00
SSAAINT41–16
methodCOMBO6 options: lanczos, bicubic, hamming, bilinear, box, nearest

Outputs (1)

NameTypeDescription
IMAGEIMAGE