Downloads · 30 days
6
10% of all-time downloads
olaverse/prism-upscaler-4x
prism-upscaler-4x is a image-to-image model from olaverse. Use it when you need one image transformed into another. The card lists the license as apache-2.0.
Downloads · 30 days
6
10% of all-time downloads
All-time downloads
61
Public
Repo size
149 KB
Likes
0
Public
Click a slice to open those files.
.pt149 KB · 96%
From the Hugging Face model README

prism models
prism-upscaler-4x upscales images 4x using a lightweight FSRCNN-style convolutional network. Same training recipe as prism-upscaler-2x (realistic degradation, openly-licensed data), applied to the harder 4x reconstruction task, where roughly 16x fewer pixels of real information are available to work from per output pixel.
Production-usable for general upscaling where moderate detail loss on fine/textured regions is acceptable — outperforms naive bicubic on edge and detail reconstruction, particularly under real-world degraded (noisy/compressed) input.
Not the right choice if fine hair/texture fidelity is critical at this scale — see Known Limitations.
[BEFORE / AFTER IMAGE HERE]
| Architecture | FSRCNN (feature extraction → shrink → mapping → expand → sub-pixel conv) |
| Parameters | ~25K |
| Scale factor | 4x (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 |
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-4x", filename="model.py")
ckpt_file = hf_hub_download(repo_id="olaverse/prism-upscaler-4x", filename="pytorch_model.pt")
config_file = hf_hub_download(repo_id="olaverse/prism-upscaler-4x", 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")
Qualitative comparison against a naive bicubic baseline under realistic degradation: better edge preservation and facial-detail sharpness than bicubic at this scale, with the gap between the two becoming more noticeable than at 2x — consistent with the general pattern that learned upscaling becomes more advantageous relative to naive interpolation as the reconstruction task gets harder. Informal single-image testing, not a scored benchmark against a standard academic test set (Set5/Set14/etc).
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.
@misc{prism-upscaler-4x,
title = {prism-upscaler-4x},
author = {Olaverse},
year = {2026},
url = {https://huggingface.co/olaverse/prism-upscaler-4x}
}