ComfyUI Node Runs on cloud

Binary Lines

The dead-simple threshold preprocessor for scribble ControlNet

By Fannovel16·Created 3 years ago·Updated 4 months ago· 4,134
Binary Lines
  • image
  • IMAGE
bin_threshold100
resolution512

This is the bluntest instrument in the pack, and sometimes blunt is exactly right. Binary Lines takes your image, picks a brightness cutoff, and snaps every pixel to either pure black or pure white. No gradients, no soft edges, no model deciding what's important - just a hard threshold. The result is a stark two-tone image you feed into a scribble-style ControlNet. When you want to hand the model a crude silhouette or a high-contrast shape and let it fill in the rest, Binary gets you there with zero fuss.

How it works

There's no neural network here. It's a classic image-processing threshold: every pixel above the cutoff becomes white, everything below becomes black. That's it. The README maps this preprocessor to control_scribble - the scribble ControlNet is trained to take rough, sketchy black-and-white input and generate a full image around it, so a harsh binary map is a natural fit. Think of it as the "I already have a clean high-contrast shape" path into scribble conditioning, versus the fake-scribble preprocessors that try to simulate a hand drawing from a photo.

Because it's pure thresholding, it's instant and it never needs to download anything. It also means the quality is entirely on you: garbage contrast in, garbage silhouette out.

The one input that matters

The node takes an image and returns an IMAGE - the black-and-white result - that goes into your ControlNet Apply node. There's really only one knob:

  • bin_threshold (default 100, range 0–255) - the brightness cutoff. Lower it and more of the image turns white; raise it and more turns black. This is the entire game. Slide it until the shape you care about is cleanly separated from the background.

resolution (default 512) sets the working size. That's the whole interface - it's about as simple as a ComfyUI node gets.

Installing it

ComfyUI Manager: search ComfyUI's ControlNet Auxiliary Preprocessors, install, restart. Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/Fannovel16/comfyui_controlnet_aux
pip install -r requirements.txt

Restart ComfyUI. No model download for this one - it's pure math, so it works the instant the pack loads.

Where people get burned

The big one: Binary is only as good as your source contrast. Feed it a flat, evenly-lit photo and no threshold value will cleanly separate the subject - you'll get blobs. It shines on images that already have strong light/dark separation, or on graphics and logos. If you're fighting the threshold and never getting a clean result, that's the signal to switch to a real line extractor like Canny, lineart, or one of the fake-scribble preprocessors that were built to handle photographic input.

And the usual reminder for anything in this pack: Binary just makes the hint image. You need a scribble (or scribble-compatible) ControlNet model loaded downstream, or the pretty two-tone picture never influences a single pixel of your generation.

CategoryControlNet Preprocessors/Line Extractors

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
bin_thresholdoptINT1000–255
resolutionoptINT51264–16384

Outputs (1)

NameTypeDescription
IMAGEIMAGE