ImageDrawLineByContainer
A line sized to an existing image, endpoints in fractions
- container
- IMAGE
ImageDrawLineByContainer draws a straight line whose canvas size comes from an existing image rather than a width/height pair you type. Everything else - normalized endpoints, thickness, color, anti-aliasing - is inherited from ImageDrawLine. It's the container-flavored variant for when the line should live at whatever resolution your image already is.
How it works
It reads the width and height of the first frame of the container input and forwards them into ImageDrawLine, which does the drawing: RGBA canvas, PIL ImageDraw.line, supersample by SSAA, downscale with method. Like every ByContainer draw node, the container sets the size only - the line is drawn on a fresh transparent canvas, and the container's pixels don't appear in the output. Composite the two if you want the line over the container's content.
Inputs that matter:
- container - any IMAGE; its size becomes the canvas.
- size - line thickness, default 1.
- start_x / start_y, end_x / end_y - endpoints as 0–1 fractions of the canvas; defaults draw a top-left-to-bottom-right diagonal.
- red / green / blue / alpha - color, alpha default 1.
- SSAA (default 4) and method (default
lanczos).
Where people get burned
Same two notes as the parent node: a thick line with an endpoint exactly at 1 gets half its stroke clipped at the border, so pull endpoints slightly inside if you need the full width visible; and the output has a transparent background, so a lone line floats on a checkerboard in Preview.
Why you'd use it
The container-tracking use case: a divider or rule that always matches the image it decorates, without maintaining a size. It slots neatly into template workflows where the same container feeds the ByContainer composite nodes, so the line, the canvas, and the compositing all stay in sync when you swap resolutions.
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.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| container | IMAGE | — | |
| size | INT | 1 | — |
| start_x | FLOAT | 0.00 | — |
| start_y | FLOAT | 0.00 | — |
| end_x | FLOAT | 1.00 | — |
| end_y | FLOAT | 1.00 | — |
| red | INT | 255 | — |
| green | INT | 255 | — |
| blue | INT | 255 | — |
| alpha | FLOAT | 1.00 | — |
| SSAA | INT | 41–16 | — |
| method | COMBO | 6 options: lanczos, bicubic, hamming, bilinear, box, nearest |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |