prism-denoiser

prism

prism models

prism-denoiser removes real-world image degradation β€” Gaussian noise, blur, and JPEG-like compression artifacts β€” using a compact U-Net trained with on-the-fly random degradation. Unlike the fixed-scale upscalers, this model doesn't change resolution: it takes a degraded image and returns a cleaner version at the same size, useful as a standalone restoration tool or as pre-processing before other image tasks.

Production-usable as a "meaningfully better than doing nothing" restoration step β€” reliably reduces noise and recovers accurate color, though on complex, high-detail scenes some residual grain typically remains rather than a fully clean result. See Benchmarks and Known Limitations for the honest picture.

πŸ—’οΈ Model Details

Architecture Compact U-Net (3 down/up levels, base width 48)
Input / Output RGB image, 128x128, same resolution in and out
Training data PD12M, pxhere, cc0-textures, ambientcg (Apache/CC0-licensed)
Training Mixed precision, on-the-fly random degradation (blur + Gaussian noise + JPEG-approximation, each applied with independent random probability/severity per sample), L1 + VGG-perceptual loss, early stopping on validation PSNR

πŸƒ Usage

from huggingface_hub import hf_hub_download
import torch, importlib.util, json
from PIL import Image
import torchvision.transforms.functional as TF

model_file = hf_hub_download(repo_id="olaverse/prism-denoiser", filename="model.py")
ckpt_file = hf_hub_download(repo_id="olaverse/prism-denoiser", filename="pytorch_model.pt")
config_file = hf_hub_download(repo_id="olaverse/prism-denoiser", filename="config.json")

spec = importlib.util.spec_from_file_location("model", model_file)
model_module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(model_module)

config = json.load(open(config_file))
model = model_module.UNet(**config)
model.load_state_dict(torch.load(ckpt_file, map_location="cpu")["net"])
model.eval()

img = Image.open("noisy.jpg").convert("RGB").resize((128, 128))
x = TF.to_tensor(img).unsqueeze(0)
with torch.no_grad():
    output = model(x).clamp(0, 1)
TF.to_pil_image(output[0]).save("denoised.jpg")

Trained and tested at 128x128 β€” resize input accordingly for best results.

πŸ“Š Benchmarks

Visual and PSNR comparison on two test cases (informal single-image checks, not a scored benchmark against a standard dataset):

  • Near-grayscale texture image: noisy PSNR 20.79 dB β†’ denoised 24.01 dB (+3.22 dB). Noise was fully smoothed out, but the output carried a faint color tint not present in the (genuinely grayscale) ground truth β€” the model reads independent per-channel color noise as partial color signal when the true image has none.
  • Full-color outdoor portrait photo: noisy PSNR 22.59 dB β†’ denoised 26.84 dB (+4.25 dB). Color reproduction was accurate with no tint, but visible residual grain remained in complex regions (sky, foliage) β€” real, measurable improvement without a fully "clean" result.

Known Limitations

  • Residual noise on complex, high-detail scenes β€” on busy real-world photos, denoising is genuinely effective but typically incomplete; some grain remains, particularly in low-texture regions like sky. Not a full noise-removal solution at this model's current size/training length.
  • Slight color tint on near-grayscale or texture-only images β€” the model can render random per-channel noise as faint color on inputs that have no real color content, since it was trained predominantly on full-color photos. Less of an issue on genuinely colorful images.
  • Trained and tested at 128x128 resolution; not evaluated at other input sizes.
  • Not evaluated against standard denoising benchmarks (e.g. SIDD, DND).

Training data & licensing

Trained on PD12M (Spawning/PD12M, CDLA-Permissive-2.0), pxhere (nyuuzyou/pxhere, CC0), cc0-textures (nyuuzyou/cc0-textures, CC0), and ambientcg (nyuuzyou/ambientcg, CC0). Released under Apache-2.0.

Citation

@misc{prism-denoiser,
  title  = {prism-denoiser},
  author = {Olaverse},
  year   = {2026},
  url    = {https://huggingface.co/olaverse/prism-denoiser}
}
Downloads last month
26
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Collection including olaverse/prism-denoiser