Nodes/ComfyUI-Inference-Core-Nodes/Inference_Core_TEEDPreprocessor
ComfyUI Node

Inference_Core_TEEDPreprocessor

Sharp, thin edge maps for ControlNet

By LykosAI·Created 2 years ago·Updated about a year ago· 33
Inference_Core_TEEDPreprocessor
  • image
  • IMAGE
safe_steps2
resolution512

TEED stands for "Tiny and Efficient Model for the Edge Detection Generalization" - a small, fast edge-detection network that punches well above its size. It sits in the same family as HED and PiDiNet (the classic "softedge" preprocessors), but where those give you soft, gradient-y edges, TEED produces thin, clean, continuous lines - closer to a hand-inked outline than a gradient map. If you've used Anyline, the popular fast line preprocessor that showed up in 2024, you've already used TEED's ideas once removed: Anyline builds directly on this same work, adding extra detail and text recognition on top.

Where it fits

ControlNet's edge/line family covers a spectrum from hard-and-literal (Canny) to soft-and-forgiving (HED/PiDiNet). TEED sits toward the sharp end but without Canny's brittleness - you get crisp, thin lines without Canny's tendency to pick up every bit of surface noise and texture. It's a solid pick for architecture, product shots, and line-art-style conditioning where you want clean structure without hand-tuning two threshold sliders. It's also one of the twelve conditions in SDXL's xinsir union ControlNet, alongside PIDI softedge - so if you're comparing preprocessors for a segmentation-and-lines workflow, TEED and PIDI are the two "soft edge" options worth A/B-ing against each other.

Inputs and outputs

  • image (required) - the source photo.
  • safe_steps (optional, default 2, range 0–10) - a small integer that cleans up the raw edge intensities before they're returned. It isn't documented anywhere public, so treat the default as the sane starting point; if your edge map looks noisy or broken up, nudging it up a step or two is worth trying before you reach for a different preprocessor entirely.
  • resolution (optional, default 512, range 64–2048) - working resolution; match it to your generation size for edges that line up cleanly.

Output is a single IMAGE - the line map - which feeds a ControlNet Apply node paired with a Canny/lineart/softedge-capable ControlNet checkpoint or your base model's union at its line-condition mode.

Installing it

ComfyUI Manager: search ComfyUI-Inference-Core-Nodes, install, restart. Or from Stability Matrix's own Extensions Manager, since LykosAI builds both. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/LykosAI/ComfyUI-Inference-Core-Nodes

Then run install.py with ComfyUI's Python, or pick a pip extra for your hardware - pip install -e .[cuda], .[cuda12], .[rocm], .[directml], or .[cpu] - which pulls in the dependencies plus a compiled onnxruntime wheel for the parts of the pack that use it. A plain pip install -e . works too, just without the accelerated wheel. Restart ComfyUI afterward. TEED's weights aren't bundled with the pack - the first time you actually run this node, it downloads them, so budget for a short pause and make sure you're online.

Where people get burned

The pack-wide issue to know about: install steps that silently target the wrong Python leave you with ModuleNotFoundError: No module named 'inference_core_nodes' even though the clone succeeded - this has bitten enough people that it's worth checking first if the node refuses to import. If you're on a portable ComfyUI build, run the install with its bundled python.exe -m pip, not your system pip. There are also reports of the whole pack failing to import on Mac due to dependency conflicts; pip install -e .[cpu] is the correct extra there since none of the GPU-accelerated onnxruntime builds apply. On the preprocessing side itself: TEED trades detail for cleanliness, so on very busy or highly textured images you may get a sparser line map than Canny would - that's the point, not a bug, but if you actually wanted every wrinkle and texture line, Canny (with its thresholds tuned down) or PIDI softedge will get you more. And as always, no ControlNet checkpoint loaded downstream means the line map does nothing - the node only produces the hint image.

CategoryControlNet Preprocessors/Line Extractors

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
safe_stepsoptINT20–10
resolutionoptINT51264–2048

Outputs (1)

NameTypeDescription
IMAGEIMAGE