Files
drawit/comfyui/README.md
T
2026-06-29 09:40:43 -05:00

1.9 KiB

ComfyUI workflow for the "Create" feature

DrawIt's Create feature sends a fixed coloring-book prompt to a self-hosted ComfyUI server and turns the result into a lesson. Nothing leaves your machine.

Setup

  1. Run ComfyUI (default: http://127.0.0.1:8188).
  2. Set COMFYUI_URL in .env.local (blank = feature disabled).
  3. Provide a workflow exported in API format (ComfyUI → Settings → enable dev mode → "Save (API format)") and point COMFYUI_WORKFLOW at it.

ColorBook01.json here is the active workflow (COMFYUI_WORKFLOW). Its positive-prompt node contains a [DrawItSubject] placeholder — DrawIt replaces that token with the creator's one-word subject and sets a fresh random seed; the rest of your prompt is kept exactly as written. (coloring-book.workflow_api.json is the older stock SD1.5 template, kept for reference.)

  • COMFYUI_PROMPT_NODE (default 6) — the positive CLIPTextEncode node containing [DrawItSubject].
  • COMFYUI_SEED_NODE (default 3) — the KSampler node.
  • COMFYUI_SUBJECT_TOKEN (default [DrawItSubject]) — the placeholder to substitute.

Example: node 6 text "coloring book page, single cute [DrawItSubject], black and white line art, …" with subject Zebra becomes "coloring book page, single cute Zebra, black and white line art, …".

Tips for clean line art (matters — we vectorize it with potrace)

The cleaner and bolder the outlines, the better the trace lessons look. Recommended:

  • Use a line-art / coloring-book LoRA or model if you have one, and bump steps.
  • Keep the negative prompt rejecting color/shading/background clutter (already set).
  • The image is auto-thresholded to pure black/white and fitted to the lesson canvas, so aim for bold, fully-closed outlines on a white background — thin or broken lines vectorize poorly.

Edit ckpt_name to a checkpoint you actually have installed.