Anymatix HED Soft Edge
HED soft edges from a local checkpoint — the ControlNet preprocessor that never phones home
- image
- IMAGE
ControlNet's line condition has a soft-edge variant worth knowing: HED produces edge maps that look hand-drawn and forgiving rather than razor-sharp, and for anything where you want structure without the harshness of Canny - interiors, natural scenes, stylized work - it's often the better condition to drive a model with. AnymatixHEDPreprocessor extracts those soft edges, and like its DWPose sibling in this pack, its whole reason to exist is that it does it fully offline.
Why does that need a special node? Because the standard comfyui_controlnet_aux HED detector resolves its checkpoint through Hugging Face's download helper on first use - a network call baked into loading. On the machine where a workflow card was built, that works; on every machine that only installs the workflow, it fails, especially with HF_HUB_OFFLINE=1. This node bypasses the one network-bound part of the detector (from_pretrained) and loads the checkpoint from a local path instead. The network, the forward pass, and the "safe" post-processing are the vendored upstream implementation - so the map you get is identical to what the normal node would produce. A wrapper, not a reimplementation.
How it works
Feed it an image and a path to the HED checkpoint. Like the DWPose node, model_name is a STRING that defaults empty and the weights must already be on disk - run an AnymatixFetcher (which knows the hed type and files the weights into the annotator checkpoints folder) first, then wire its output in, and the node never touches the network. The other controls:
- safe (default enable) - HED's "safe" mode, which applies a smoothing step that produces cleaner, less speckled lines. Leave it on unless you specifically want the raw detector output.
- resolution (default 512) - the working resolution for edge detection.
Outputs a single IMAGE - the soft-edge map - which feeds the ControlNet condition input for whichever model family you're using. It's the kind of preprocessor that pairs with the pack's AnymatixControlNetLoader in a completely offline generation loop.
Install
The pack plus its one optional dependency:
cd ComfyUI/custom_nodes
git clone https://github.com/Anymatix/anymatix-comfy-nodes
git clone https://github.com/Fannovel16/comfyui_controlnet_aux
then restart and let the fetcher provision the HED weights. The node only shows up when comfyui_controlnet_aux is installed; it's checked at call time, so a missing sibling costs you this node alone.
Issues to expect
The pattern is the same as the rest of the offline preprocessors: forget to run the fetcher and you get a clear file-not-found naming the missing checkpoint - that's the node working as designed, not breaking. And a tip from using it: HED's soft edges are softer, so the control strength you'd use for Canny will often under-bite with HED. If your output ignores the condition, nudge the ControlNet strength up before you suspect the preprocessor.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_name | STRING | — | |
| safe | COMBO | enable | 2 options: enable, disable |
| resolution | INT | 51264–16384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |