prism-upscaler-2x

prism

prism models

prism-upscaler-2x upscales images 2x using a lightweight FSRCNN-style convolutional network. Trained from scratch on a mix of openly-licensed photos and textures (PD12M, pxhere, cc0-textures, ambientcg), with realistic degradation (blur, sensor noise, JPEG re-compression) simulated at train time rather than plain bicubic downsampling β€” so it's built for real-world low-quality input, not just clean synthetic test images.

Production-ready for general photographic content β€” sharp, well-lit source images with clear edge structure see the strongest improvement over naive bicubic upscaling.

Also works reasonably on smoother/lower-contrast images, though gains over bicubic are smaller there β€” see Benchmarks and Known Limitations.

[BEFORE / AFTER IMAGE HERE]

πŸ—’οΈ Model Details

Architecture FSRCNN (feature extraction β†’ shrink β†’ mapping β†’ expand β†’ sub-pixel conv)
Parameters ~25K
Scale factor 2x (fixed)
Input RGB image, any resolution
Training data PD12M, pxhere, cc0-textures, ambientcg (Apache/CC0-licensed)
Training Mixed precision, early stopping on validation PSNR, realistic degradation pipeline

πŸƒ 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-upscaler-2x", filename="model.py")
ckpt_file = hf_hub_download(repo_id="olaverse/prism-upscaler-2x", filename="pytorch_model.pt")
config_file = hf_hub_download(repo_id="olaverse/prism-upscaler-2x", 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.FSRCNN(**config)
model.load_state_dict(torch.load(ckpt_file, map_location="cpu"))
model.eval()

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

No preprocessing, cropping, or padding required β€” the model is fully convolutional and works on any input resolution directly.

πŸ“Š Benchmarks

Qualitative comparison against a naive bicubic baseline under realistic degradation (blur, sensor noise, JPEG re-compression β€” not clean bicubic-only downsampling): visually sharper edge and detail reconstruction than bicubic, particularly around fine facial and clothing detail, though the overall difference at this scale is modest β€” roughly comparable to bicubic in most respects, with the model's advantage growing more clearly at higher scale factors. Informal single-image testing, not a scored benchmark against a standard academic test set (Set5/Set14/etc).

Known Limitations

  • Best results on well-lit, reasonably sharp source images β€” very low source resolution (under ~100px on the short side) leaves too little real information to recover regardless of method.
  • Advantage over bicubic is most visible under realistic (noisy/compressed) degradation rather than clean, undegraded low-resolution input.
  • Not evaluated against standard academic benchmarks (Set5/Set14/BSD100/Urban100).

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-upscaler-2x,
  title  = {prism-upscaler-2x},
  author = {Olaverse},
  year   = {2026},
  url    = {https://huggingface.co/olaverse/prism-upscaler-2x}
}
Downloads last month
39
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support