π JPG & Noise Remover
SnJake's JPG & Noise Remover
- image
- image
Somewhere in your download folder is an image that looks like it survived a fax machine. Maybe it's an anime wall you saved from a booru at 60% JPEG quality, maybe it's a PNG that's been re-encoded three times until the edges of every character have that crackly mosquito-noise halo. That's exactly the job this node exists for: strip the JPEG blocking, the digital noise, and a bit of blur, and hand you back a cleaner image at the same resolution.
Important framing before you get excited: this is not an upscaler. It doesn't add pixels, and it doesn't invent detail the way a generative restorer like SeedVR2 does. Think of the upscaling world as three different jobs - more pixels, more detail, more pixels over time. This node sits in a quiet fourth corner: cleaner pixels, same size. If your source is low-res and soft, run a real upscaler after it; if it's high-res and crunchy, this is the pass that makes the upscale worth doing in the first place.
How it works
It's a feed-forward NAFNet-based UNet - a CNN restoration network, not a diffusion model. No sampling loop, no prompts, fully deterministic: same input in, same output out, in a fraction of a second. NAFNet's trick is a SimpleGate (split channels in half, multiply them together) plus simplified channel attention and LayerNorm2d - an architecture that got famous in image restoration for doing a lot on a single GPU.
Version 2 is the interesting one. It was trained on roughly 40k clean anime images from Danbooru2024, degraded with JPEG compression, noise, and slight blur, and trained with a perceptual (VGG) loss to keep textures sharp instead of glassy. Because the architecture learns a residual - it predicts the difference and adds it back to the input - a trained model can also learn to predict "nothing" when the input looks clean. That's the one quirk you'll actually hit: V2 is conservative and will sometimes leave a slightly-crunchy image basically untouched because it judged it fine.
The inputs that matter
There are a dozen inputs here, but you'll touch maybe four:
weights_name- the dropdown that picks v1 vs v2. The three choices are the V1 model (best_ema_15E.safetensors), V2 in fp32 (best_ema_v2_E11.pt), and V2 pre-quantized to bf16 (best_ema_v2_E11_BF16.safetensors). If your card is old enough that it doesn't support bf16, stick with the fp32.pt.tile/overlap- tile size for big images, to keep VRAM happy. Default is 512/64, which is a fine starting point.tileof 0 disables tiling and processes the whole image at once; lower it toward 256 if you're on a small card.blend- mixes the cleaned output back with the original (0 = full effect, 1 = original). If the result looks over-smoothed, a tiny0.1β0.2rescues fine detail.force_process/force_noise_std- the V2 bypass. When V2 decides a frame is clean, flipforce_processon and nudgeforce_noise_stdfrom 0.02 to ~0.05. It adds a whisper of noise so the model is forced to actually run; the output is still blended toward the original.
Leave base_ch at 64 - the node checks the model's own spec and overrides you anyway if you stray. Same with edge_aware_window (keep it on; it stops tile seams from darkening the image edges), amp_dtype (auto is right), and device (auto).
The single output, image, is the cleaned RGB image - wire it to a Save Image, straight into an upscaler, or back into the rest of your workflow. Nothing else comes out.
Installation
Two easy ways. ComfyUI Manager: search the pack title "JPG & Noise Remover" and install. Or, the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/SnJake/SnJake_JPG_Artifacts_Noise_Cleaner.git
cd SnJake_JPG_Artifacts_Noise_Cleaner
pip install -r requirements.txt # activate your venv first
Then restart ComfyUI. The node shows up under Add Node β π SnJake/JPG & Noise Remover.
Good news on dependencies: this one is light. The requirements are just huggingface_hub and safetensors - no torch install drama, no extra inference runtime, no PyAV. The model weights are the one thing you need, and honestly you don't even need to download them: on first queue run the node fetches your selected weights from Hugging Face (SnJake/JPG_Noise_Remover) into ComfyUI/models/artifacts_remover/ automatically. If you're fully offline, drop a weights file there yourself and pick it in the dropdown.
Where people get burned
The most common gotcha is expecting it to fix photos. It was trained on anime art, and while the architecture generalizes, its idea of "clean" is Danbooru-clean. On a photo it'll often do more smoothing than you want - reach for blend before you reach for a different node. Second: V2's conservatism. If it feels like the node is doing nothing, that's not a broken install - that's the model judging your input clean. Use force_process. Third: it only accepts 3-channel RGB. Feed it an RGBA PNG and you'll get an error; strip the alpha first.
Honest verdict: it's a niche utility with near-zero community buzz, so you won't find a thousand tutorials vouching for it. But for "my anime image is crunchy and I want it clean at full res" it's a one-node answer that runs in milliseconds and auto-downloads its own weights. That's a good deal.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| weights_name | COMBO | best_ema_v2_E11.pt | 3 options: best_ema_15E.safetensors, best_ema_v2_E11.pt, best_ema_v2_E11_BF16.safetensors |
| weights_path | STRING | /tmp/ComfyUI/models/artifacts_remover/best_ema_v2_E11.pt | β |
| base_ch | INT | 6416β256 | β |
| tile | INT | 5120β4096 | β |
| overlap | INT | 640β1024 | β |
| edge_aware_window | BOOLEAN | true | β |
| blend | FLOAT | 0.000β1 | β |
| amp_dtype | COMBO | auto | 4 options: auto, bf16, fp16, none |
| device | COMBO | auto | 3 options: auto, cuda, cpu |
| force_process | BOOLEAN | false | β |
| force_noise_std | FLOAT | 0.0200β0.1 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |