Nodes/ꘇ Genereti/ꘇ drawing
ComfyUI Node

ꘇ drawing

Sketch a doodle in your graph and get image, mask and SVG out

By languel·Created about a month ago·Updated 3 days ago· 1
ꘇ drawing
    • image
    • mask
    • svg
    • json
    ◄drawing►
    ◄capture►

    The pad inside the graph

    ꘇ drawing puts an Excalidraw canvas inside a Comfy node. You draw, the node hands you four different views of what you drew: an IMAGE, a MASK, a cropped SVG string, and the editable Excalidraw scene as JSON.

    Why bother? Because ComfyUI's usual relationship with input images is "go to another application, save a file, drag it in." A drawing surface that sits in the graph and exposes the same doodle as both pixels and a mask is the thing you want for: blocking out a composition before generating, scribbling a rough mask for inpainting, or doing live sketch-to-image where you'd otherwise be alt-tabbing. It also pairs with the pack's ꘇ Input Source node, which has a Doodle slot for exactly this image.

    The MASK output is the sleeper. Masked workflows are where beginners get stuck, and a hand-drawn mask with no image editor involved removes a whole category of friction.

    How it works, and why there's a capture

    Two inputs, both STRING and both socketless - they're widgets, not wires, and you can't connect anything to them:

    • drawing - the live editor state.
    • capture - a serialised snapshot the browser uploads at queue time.

    That capture handshake is the mechanism worth understanding. Comfy executes the backend node; the browser widget writes a JSON blob containing temp filenames for the rasterised drawing and the mask, plus the svg and json strings; the backend then loads those files through Comfy's own get_annotated_filepath helper. Because the graph executes on the captured frame, a queued result and the canvas you were looking at agree.

    The alpha handling is careful in a way that's easy to miss: if any pixel of the drawing is transparent, the output stays RGBA with alpha preserved; if it's fully opaque, it comes out RGB. The mask is always loaded as single-channel grayscale and normalised to 0..1, which is the shape Comfy's mask consumers expect.

    Inputs and outputs

    • drawing - leave it alone. It's the editor's own state field.
    • capture - also leave it alone; the frontend fills it per queue.
    • image - IMAGE, the drawn picture, sized to the frame you configured in the editor.
    • mask - MASK, the drawn mask.
    • svg - STRING, the cropped vector version of the drawing.
    • json - STRING, the editable Excalidraw scene.

    That last pair is the interesting part for programmatic use: the SVG is text, so it can go into a document node, be stored, or be handed to something else that understands vectors. The scene JSON round-trips - paste it back into the editor and your drawing returns.

    Install

    Genereti only. Manager → search Genereti (publisher liuboto) → install → restart → refresh the browser page, which matters more here than usual: the editor is a vendored Excalidraw bundle the pack serves from its own route, so a stale tab gets nothing.

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

    ComfyUI's own Python, not a global pip - .venv on a checkout, python_embeded\python.exe on Windows Portable, the bundled environment on Desktop. requirements.txt is a single line (comfyui-frontend-package>=1.53.6): no models, no torch surgery, no extra node packs. ComfyUI 0.38.2+ and Python 3.11+ are the floors, and the reference platform is macOS/Apple Silicon.

    Gotchas

    • Open the ꘇ drawing editor before queueing. That's the error you get when capture is empty - you haven't opened the editor, or you reloaded the page and lost the scene. It's a hard-stop by design; nothing gets silently substituted.
    • A page reload can lose the drawing if it wasn't saved into the workflow. Save the graph.
    • Alpha, and the drawing editor is the newest surface in the pack. The README says "super alpha - early classroom testing" and tells you to back up before updating. The drawing editor's docs even carry an "unreleased" validation note. Expect the UI to move; the node ID (GeneretiDrawing) is stable, so workflows survive.
    • It's a source, not a painter. No brushes beyond Excalidraw's, no layer model beyond Excalidraw's. If you want a full paint application, you want one - this is the 80% case of "I need a scribble in the graph."
    CategoryGenereti / Interactive Sources

    Inputs (2)

    NameTypeDefaultDescription
    drawingSTRING—
    captureSTRING—

    Outputs (4)

    NameTypeDescription
    imageIMAGE—
    maskMASK—
    svgSTRING—
    jsonSTRING—