Shibiko AI - Remove Noise
OpenCV's bilateral + guided filters, tuned for cleanup, not generation
- image
- IMAGE
Denoising without diffusion. This node cleans up noisy or compressed images using two classic OpenCV filters - bilateral and guided - that smooth away noise while hanging onto edge detail. It's the kind of cleanup you run before an upscaler so the upscaler isn't amplifying noise into fake texture, and it's a port of toyxyz's test nodes, which the README credits.
The honest framing: this is a traditional signal-processing node, so it can't invent detail and it won't fix a genuinely destroyed image - that's SeedVR2's or SUPIR's job, per the upscaling doc's hierarchy. What it's great at is the boring-but-real task of degraining a scan, flattening sensor noise, or cleaning up a compressed render before a hires pass, all on CPU with zero VRAM cost.
How it works
Two filters, both from OpenCV. Bilateral filtering smooths while preserving edges (that's what sigma_color and sigma_space control - how much neighbors can differ in tone or position before they're treated as a boundary). Guided filtering uses one image to guide the filtering of another, which is great for edge-aware smoothing. The guided_first toggle decides which runs first: guided then bilateral (the default) tends to flatten larger areas first, bilateral first keeps more of the original texture. Each filter runs in a loop (guided_loop, bilateral_loop) - a couple of passes beats one aggressive pass, which is why the defaults do 4 guided + 1 bilateral. Batches get a real ComfyUI progress bar, which is a nice touch.
The inputs
- guided_first (default on) - filter order, described above.
- bilateral_loop (default 1) and d (diameter, default 15) - note the code forces
dto an odd number for you. This is the main intensity dial. - sigma_color (45) / sigma_space (45) - the bilateral filter's edge-sensitivity controls. Higher = more smoothing.
- guided_loop (default 4) and radius (4) - guided filter passes and window size.
- eps (default 16) - regularization for the guided filter; higher = smoother.
Output is a single IMAGE.
Install and the opencv gotcha
cd ComfyUI/custom_nodes
git clone https://github.com/Shibiko-AI/ShibikoAI-ComfyUI-Tools
Or ComfyUI Manager → "Shibiko". Here's the thing to know: guided filtering lives in cv2.ximgproc, which only ships in opencv-contrib-python, not the plain opencv-python package. If the node errors with AttributeError: module 'cv2' has no attribute 'ximgproc', that's your environment:
pip install opencv-contrib-python
Also expect it to be slow-ish on big images - it's numpy on CPU, and a 4K frame through 4 guided passes takes real seconds. That's the price of not touching your VRAM. Start with the defaults; they're sensibly chosen. If things come out plasticky, drop guided_loop to 2 and raise sigma_color a touch.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| guided_first | BOOLEAN | true | — |
| bilateral_loop | INT | 10–8192 | — |
| d | INT | 150–8192 | — |
| sigma_color | INT | 450–8192 | — |
| sigma_space | INT | 450–8192 | — |
| guided_loop | INT | 40–8192 | — |
| radius | INT | 40–8192 | — |
| eps | INT | 160–8192 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |