Rough Outline JK๐
Canny edges, but contour-clean โ the motion-outline maker
- images
- outline_image
- overlay_image
- canny_image
Raw Canny edges are noisy. Every little texture and shadow gets a line, and when you feed that into a ControlNet you end up generating from a static-y mess. Rough Outline JK is the "clean it up" pass: it runs Canny, then processes the result into smooth closed contours so you get a usable outline instead of edge confetti. It shipped in v1.9.9 specifically to generate motion outlines for video workflows, and it's the difference between "scribble that fights you" and "scribble that guides."
The pipeline
The node's mechanism is a textbook OpenCV chain, and understanding it makes the knobs obvious:
- Grayscale + Gaussian blur (
blur_size, default 5) - kills texture noise before edge detection. - Canny (
canny_low50 /canny_high150) - the classic dual-threshold edge detector. - Morphological close (
morph_kernel, default 9) - closes the gaps between nearby edges so contours become solid loops. - Find contours + simplify (
simplify_mode,simplify_tolerance) - keeps only the outline shapes and straightens their geometry.dynamicscales the tolerance to each contour's length;fixedapplies it literally. - Draw with a set thickness (
thickness, default 4).
The three outputs
- outline_image - the clean result: black lines on a white background. This is the one you feed to a ControlNet.
- overlay_image - the original photo with the contours drawn on top in red. Perfect for checking "did the outline actually follow the subject."
- canny_image - the raw pre-contour Canny output, so you can see what the detector found before the cleanup.
Having all three is genuinely handy for tuning - wire the overlay into a preview, look at whether the contours match your subject, and adjust thresholds without guessing.
The knobs that matter
For a beginner: canny_low/canny_high control how much detail counts as an edge (raise them for a cleaner, more abstract outline), morph_kernel controls how aggressively gaps get bridged, and thickness controls how chunky the final line is. The defaults are a decent starting point for photos; for clean CGI renders you can often drop the blur and raise the thresholds.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
pip install -r requirements.txt
This node is the reason the pack depends on opencv-python - if your install skipped requirements, this is the first node that will complain. It's the same family as Canny/scribble ControlNet conditioning, so if you're already comfortable with edge control, this is a drop-in that produces friendlier input for video motion control.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | โ | |
| blur_size | INT | 50โ30 | โ |
| canny_low | INT | 501โ255 | โ |
| canny_high | INT | 1501โ255 | โ |
| simplify_mode | COMBO | dynamic | 2 options: dynamic, fixed |
| simplify_tolerance | FLOAT | 0.50.1โ20 | โ |
| morph_kernel | INT | 90โ20 | โ |
| thickness | INT | 41โ10 | โ |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| outline_image | IMAGE | โ |
| overlay_image | IMAGE | โ |
| canny_image | IMAGE | โ |