Nodes/Allor Plugin/ImageDrawChordByContainer
ComfyUI Node

ImageDrawChordByContainer

Draw a chord at whatever size your image already is

By Nourepide·Created 3 years ago·Updated 2 years ago· 295
ImageDrawChordByContainer
  • container
  • IMAGE
size1
start_x0.00
start_y0.00
end_x1.00
end_y1.00
start0
end180
red255
green255
blue255
alpha1.00
SSAA4
method

The ByContainer version of ImageDrawChord: instead of typing width and height, you feed it an image and the chord is drawn at that image's exact dimensions. Same closed curve with its endpoints joined, same angle math, same anti-aliasing - the canvas size just comes from an existing image instead of a number box.

How it works

It reads the width and height of the first frame of the container input and passes them into ImageDrawChord, which does the drawing: RGBA canvas, PIL ImageDraw.chord, supersample by SSAA, downscale with method. As with every ByContainer draw node, the container sets the size only - the chord is drawn on a fresh transparent canvas, so the container's own pixels don't appear. Composite the two together if you want the shape on top of the container's content.

Inputs that matter:

  • container - any IMAGE; its size becomes the canvas.
  • size - stroke width, default 1. Outline-only, no fill.
  • start_x / start_y, end_x / end_y - the chord's bounding box as 0–1 fractions of the canvas; defaults 0,0 → 1,1 span the whole thing.
  • start / end - angle range in degrees (0–360), PIL-style (3 o'clock, clockwise). Default 0 → 180.
  • red / green / blue / alpha - stroke color, alpha default 1.
  • SSAA (default 4) and method (default lanczos) - quality controls shared across the draw family.

Why you'd use it

Exactly the container-tracking reason as the rest of the family: the drawing automatically matches whatever image you already have in the graph. It fits template workflows where ByContainer composite nodes are reading the same container for placement - one container drives the size of both the shape and the compositing, so nothing drifts.

The gotcha

Output is RGBA with a transparent background (the chord floats on a checkerboard in Preview). That's what you want for compositing, but if you expected a solid backdrop you'll need to composite the result onto a container yourself.

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 (14)

NameTypeDefaultDescription
containerIMAGE
sizeINT1
start_xFLOAT0.00
start_yFLOAT0.00
end_xFLOAT1.00
end_yFLOAT1.00
startINT0
endINT180
redINT255
greenINT255
blueINT255
alphaFLOAT1.00
SSAAINT41–16
methodCOMBO6 options: lanczos, bicubic, hamming, bilinear, box, nearest

Outputs (1)

NameTypeDescription
IMAGEIMAGE