Files
drawit/comfyui/README.md
T

1.4 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.

coloring-book.workflow_api.json here is the stock SD1.5 text-to-image workflow as a starting point. DrawIt injects its prompt into the positive-prompt node and a random seed into the sampler node:

  • COMFYUI_PROMPT_NODE (default 6) — the positive CLIPTextEncode node.
  • COMFYUI_SEED_NODE (default 3) — the KSampler node.

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.