Nodes/genereti/ꘇ poliplan
ComfyUI Node

ꘇ poliplan

A drawing board that lives inside the graph

By languel·Created 19 days ago·Updated a day ago· 1
ꘇ poliplan
  • image
  • image
  • mask
  • svg
  • json
◄poliplan►
◄capture►
◄width512►
◄height512►
◄over_inputfalse►

Every mask workflow has the same awkward seam in it. You need a shape - a face to repaint, a hole to cut, a scribble to hand a ControlNet - so you leave ComfyUI, draw it somewhere else, save a PNG and drag it back in. The mask is now a dead file, and changing one stroke restarts the round trip.

Poliplan removes that loop. It's the Genereti pack's drawing editor wrapped as a node: two boards stacked in the node body, image on top and mask below, both at whatever pixel size you set. Draw in the node, queue, and out come an IMAGE, a MASK, an SVG of the board and the editable document as JSON. It's the one node in this pack I'd recommend to somebody with zero interest in live visuals, because the job it does is completely ordinary.

How it actually works

The editor is an iframe running a vendored copy of Poliplan, served by the pack from /genereti/poliplan/.... The node is a thin bridge: two widgets, poliplan (the document) and capture (the exported files), both filled in by the frontend. You should never have to type in either.

At queue time the frontend exports the boards to PNG, and - nice touch - only exports the boards whose outputs you actually connected. Wire up mask and nothing else, and it doesn't bother rendering the image board. Those PNGs get uploaded to Comfy's temp folder via the normal /upload/image route, and the capture string becomes the list of file references the Python side reads back.

The mask is built carefully, which is why the output looks good rather than crunchy. The mask board is white marks on transparent paper; the code takes the board's luminance and multiplies it by its alpha channel, so unpainted areas are exactly 0 and antialiased stroke edges stay soft instead of stair-stepping. No thresholding, no jaggies, straight into a MASK tensor.

The image board keeps its transparency - see-through pixels come out RGBA, an opaque page comes out RGB. With over_input on the board has no paper at all, and the input image is composited under the drawing first (bilinear-resized to the board if the sizes disagree).

In Live mode it also pushes frames downstream while you sketch - roughly every 33 ms - so a downstream preview updates as you draw.

The four inputs that matter

width and height are the output pixel size, 64–4096 in steps of 8, per the author's tooltips: "Width of the image and mask boards, in pixels." Set these first. The boards are that size, the export is that size, and the numbers feed straight into whatever VAE you're encoding for.

over_input is the switch that decides whether the board has paper. Off, your image output is your drawing on transparency - a scribble or a lineart guide. On, it's the drawing fused onto the input image, which is what you want for a "paint the correction in place" workflow.

The optional image input is the reference: it shows under the image board so you can trace against it, per the tooltip - "Shown under the image board as a reference to draw over; see over_input."

image goes anywhere an IMAGE goes: VAE Encode, a scribble ControlNet, img2img. mask goes into a masked latent, an inpaint model, or a paste-back composite. svg and json are STRING outputs - the vector board and the versioned document - and they're why this isn't just another mask painter: the drawing stays a document instead of a flat bitmap with no history.

Installing it

Install ꘇ Genereti through Comfy's Extensions / Manager and restart, then hard-refresh the browser tab - this thing is frontend-heavy, and a stale cached frontend is the usual reason a widget renders blank.

For a manual install, stop Comfy and run:

cd ComfyUI
git clone https://github.com/languel/genereti.git custom_nodes/genereti
./.venv/bin/python -m pip install -r custom_nodes/genereti/requirements.txt

That file is short and honest: torch, numpy, pillow and aiohttp come from ComfyUI, and the only real pip line is comfyui-frontend-package>=1.53.6. Treat that as a constraint, not a formality - the classes import comfy_api.latest, so an antique install fails at import, not at run. No model downloads, and the editor is bundled.

Where people get burned

"Open the ꘇ poliplan editor before queueing." capture was empty, so the frontend never serialized an export: a freshly loaded workflow you never touched, a workflow shared between machines, or a stale tab where the custom widget never registered. Click into the node, let the editor come up, queue again.

The drawing doesn't travel with the workflow. The capture string points at PNGs in your temp folder. Send someone the workflow and they get file references, not artwork - and temp cleanup eats them on your machine eventually. Keep the json output if a drawing matters.

Small print: this pack is labelled super alpha - early classroom testing, interfaces moving, back up your workflows before you update. An editor that has to survive frontend changes is exactly the kind of thing that breaks first.

CategoryGenereti / Interactive Sources

Inputs (6)

NameTypeDefaultDescription
poliplanSTRING—
captureSTRING—
widthINT51264–4096Width of the image and mask boards, in pixels.
heightINT51264–4096Height of the image and mask boards, in pixels.
over_inputBOOLEANfalseComposite the drawing over the input image (the board has no paper then).
imageoptIMAGEShown under the image board as a reference to draw over; see over_input.

Outputs (4)

NameTypeDescription
imageIMAGE—
maskMASK—
svgSTRING—
jsonSTRING—