ComfyUI Node

Olm Sketch

Scribble ControlNet guides without ever leaving ComfyUI

By o-l-l-i·Created about a year ago·Updated about a year ago· 67
Olm Sketch
    • image
    • mask
    drawing_versioninit
    drawing_filenameunknown_drawing_filename
    drawing_uid__AUTO_GENERATE__
    workflow_nameunknown_workflow
    save_directorymy_drawings
    filenamedrawing.png
    width512
    height512
    color#ffffff
    background#000000

    Olm Sketch is the node for the loop you already run a hundred times a session: draw a rough scribble, feed it to a ControlNet, generate, tweak, generate again. Normally that means alt-tabbing to Krita or Photoshop, painting, exporting, and dragging the file back in. Olm Sketch puts a real drawing canvas inside the node, so the whole loop happens in the graph without evaluating the pipeline or touching the file system. The author - Olli Sorjonen, active on Reddit as imlo2 - built it specifically for ControlNet scribble guides and i2i paintovers, and that's exactly what it's good at.

    The name is accurate, by the way: it's a sketch pad, not a painting suite. No layers, no undo/redo yet, capped at 2048×2048. If you want Krita-inside-ComfyUI, this isn't it. But if you need to block in a composition in ten seconds and have ControlNet turn it into something, it's the most direct path that exists.

    How it works

    Half of this node lives in the browser. The JS under web/ renders an interactive canvas inside the node - freehand, line (with a dashed preview), rectangles and ellipses with fill toggle, brush width up to a ridiculous 1024px, alpha, and blend modes like multiply and screen. There's a full color picker (HEX/RGB/HSV plus an eyedropper), flip/rotate/invert, numeric crop, a blur brush, and a wraparound offset tool. As you draw, the canvas is saved to ComfyUI's temp folder, and a "save" button writes it to output/.

    The Python side is deliberately thin. On eval, generate_drawing grabs the last saved frame (from temp, or from output/olm_sketch_cache/ if a restart already happened), composites it over the background color, resizes it to your width/height, and returns an image and a mask. That split is why the node is so responsive: drawing never touches Python until you hit Queue.

    The inputs that matter

    Most of the required inputs are plumbing for persistence - drawing_version, drawing_filename, drawing_uid, and workflow_name are how the node keeps track of which canvas belongs to which node instance, and you should leave them alone unless you're diagnosing a lost sketch. The ones you'll actually set:

    • width / height (64–2048) - canvas size. ControlNet scribbles are usually small; you don't need 2K.
    • color - your brush color (hex, defaults to #ffffff).
    • background - canvas background (defaults to #000000).
    • save_directory / filename - where the Save button writes, my_drawings and drawing.png by default.

    Two outputs, both useful: image (an IMAGE, wire it into your ControlNet's image input or an i2i setup) and mask - a luminance-derived mask of what's on the canvas, handy if you're routing the sketch into inpainting instead of ControlNet.

    Installing it

    The easy way is ComfyUI Manager - search "Olm Sketch". Or clone it manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/o-l-l-i/ComfyUI-Olm-Sketch.git
    

    Then restart ComfyUI. The requirements.txt lists torch/numpy/scipy, but those are already ComfyUI's own dependencies, so in practice nothing extra gets installed - it genuinely works out of the box, no model downloads, no npm build. The node appears in the search as Olm Sketch under image/drawing.

    Where people get burned

    • Trusting auto-save. The author is blunt: persistence is best-effort, save manually, and don't rely on the cache. The permanent autosave goes to output/olm_sketch_cache/ when you save the workflow; the temp frames get culled if you draw a lot.
    • Overwriting. Saved files with the same name get clobbered. Watch your filenames.
    • Pen quirks. Wacom styluses work, but pressure breaks if Windows Ink is disabled in Wacom settings (Chrome), the eyedropper doesn't respond to pen touch, and sometimes the pen just stops adjusting widgets. A mouse-click mapped to a button gets you out of the worst of it.
    • The license. It's source-available, not open-source: you can use and build on it freely, but redistributing, reselling, or rebranding the code is prohibited. Fine for personal and commercial use of your results; just don't wrap it in your own pack.

    It's still labeled experimental and 1.0.1.x, so treat it as a great tool with rough edges - not production infrastructure. For scribble-driven ControlNet work, though, it's the one I reach for.

    Categoryimage/drawing

    Inputs (10)

    NameTypeDefaultDescription
    drawing_versionSTRINGinit
    drawing_filenameSTRINGunknown_drawing_filename
    drawing_uidSTRING__AUTO_GENERATE__
    workflow_nameSTRINGunknown_workflow
    save_directorySTRINGmy_drawings
    filenameSTRINGdrawing.png
    widthINT51264–2048
    heightINT51264–2048
    colorSTRING#ffffff
    backgroundSTRING#000000

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    maskMASK