Nodes/Allor Plugin/ImageDrawPieslice
ComfyUI Node

ImageDrawPieslice

Draw a pie slice — the filled wedge node

By Nourepide·Created 3 years ago·Updated 2 years ago· 298
ImageDrawPieslice
    • IMAGE
    ◄width256►
    ◄height256►
    ◄start_x0.00►
    ◄start_y0.00►
    ◄end_x1.00►
    ◄end_y1.00►
    ◄start0►
    ◄end240►
    ◄outline_size1►
    ◄outline_red0►
    ◄outline_green0►
    ◄outline_blue0►
    ◄outline_alpha1.00►
    ◄fill_red255►
    ◄fill_green255►
    ◄fill_blue255►
    ◄fill_alpha1.00►
    ◄SSAA4►
    ◄method▾►

    A chord is a filled curve with a flat bottom. A pieslice is the same angle range but filled all the way to the center - an actual wedge of a pie, with an outline and a fill. ImageDrawPieslice draws exactly that, and it's the node you want for pie charts, donut segments (minus the center), progress rings, or any "slice of a circle" graphic.

    How it works

    Same Allor draw pipeline: RGBA canvas, PIL ImageDraw.pieslice, supersample by SSAA, downscale with method, output a single IMAGE tensor. The wedge is defined by a bounding box (normalized 0–1 coordinates) plus a start/end angle, and it has both fill_* and outline_* controls like ImageDrawEllipse.

    Inputs that matter:

    • width / height - canvas size, default 256×256.
    • start_x / start_y, end_x / end_y - the bounding box as 0–1 fractions of the canvas. Defaults 0,0 → 1,1 span the whole thing (a square box makes a circle).
    • start / end - angle range in degrees (0–360), PIL-style: measured from 3 o'clock, increasing clockwise. Default 0 → 240 draws a three-quarter wedge.
    • outline_size - outline stroke width, default 1; set 0 for a fill only.
    • 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).

    How it differs from Chord

    Same bounding box, same angles - but Chord connects the arc's endpoints with a straight line, while Pieslice connects both ends to the center of the ellipse. For a full 0→360 range, Pieslice gives you a filled disc; Chord gives you a circle outline with a line across the middle. Pick by shape, not by name.

    The gotcha

    Output is RGBA with a transparent background, like the whole draw family - the wedge floats on a checkerboard in Preview. Perfect for compositing a slice over an image, but if you wanted a backdrop, composite onto a container. And remember the default wedge is 240°, not a full circle - set end to 360 for a complete disc.

    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. 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 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 (19)

    NameTypeDefaultDescription
    widthINT256—
    heightINT256—
    start_xFLOAT0.00—
    start_yFLOAT0.00—
    end_xFLOAT1.00—
    end_yFLOAT1.00—
    startINT0—
    endINT240—
    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—