CCTech Soft Edge Preprocessor (HED) ⚡
HED soft edges — the forgiving ControlNet condition for organic subjects
- image
- IMAGE
Canny gives you razor-thin hard edges and is great for architecture, but the moment your subject is a person, a plant, or anything with soft organic contours, a hard edge map turns into a spiky mess. That's the case for soft edges, and HED (Holistically-Nested Edge Detection) is the classic way to get them: gradient edges with variable thickness that hold a composition together without demanding the detector be perfect.
It's also the most portable edge condition you can generate. Every major 2025-26 union ControlNet - Shakker's Flux, InstantX's Qwen-Image, Alibaba PAI's Z-Image and Flux 2 - lists HED/soft-edge as one of its modes, so a map from this node will find a home on whatever modern base you're running.
How it works
HED is a small VGG-like multi-scale CNN: it looks at the image at several scales at once and fuses the results into one soft edge map, where the "edges" are smooth gradients rather than binary lines. This node is a from-scratch architecture port from comfyui_controlnet_aux (Apache-2.0) - real model code, not a wrapper around that pack and not a transformers call. The checkpoint auto-downloads from HuggingFace on first use into ComfyUI/models/hed/.
Inputs and outputs that matter
image- any photo or render. This is the one you'd reach for on portraits and organic scenes rather than blueprints.resolution(default 512, 64–2048) - internal processing size. Same story as every node in this pack: it's where the model works, not your output size.safe(default off) - quantizes the edge map into discrete levels, which tames noise and gives you flatter, more posterized edges. Matches the source pack's "safe" toggle. Worth flipping on if your preview looks too busy.
The output is one IMAGE - a soft-edged map with grey gradients instead of pure black-and-white lines. Wire it into a soft-edge/union ControlNet's control_image, or feed it to an edit model that takes an input image describing structure.
Installing it
It's one of eleven preprocessors in ChrisColeTech/ComfyUI-ControlNet-Nodes, all under 🤖 CCTech/Preprocessors. Install via ComfyUI Manager (search "ComfyUI-ControlNet-Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/ChrisColeTech/ComfyUI-ControlNet-Nodes
Restart ComfyUI, and you're done - no dependencies beyond the pack's requirements.txt (huggingface_hub, opencv-python). If you're comparing it against the pack's other soft-edge node, PiDiNet: HED is the Apache-2.0 standard; PiDiNet is sharper and faster but carries a research-use license restriction. For anything commercial, HED is the safe pick.
Common issues
The only real surprise is the first run downloading the checkpoint - give the queue a moment. If the map looks too noisy for your taste, that's precisely what the safe toggle exists to fix, so flip it rather than fighting thresholds (there are none here). And don't judge the preview too harshly: soft-edge maps are meant to look a little muddy compared to Canny, and the ControlNet was trained on exactly that look.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| resolution | INT | 51264–2048 | — |
| safe | BOOLEAN | false | Quantize the edge map into discrete levels - reduces noise, matches the source pack's 'safe' toggle. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |