prism-upscaler-4x

prism

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]

πŸ—’οΈ Model Details

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

πŸƒ 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-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")

πŸ“Š Benchmarks

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).

Known Limitations

  • Over-smoothing on fine/curly hair and other high-frequency texture β€” the model favors safe, averaged reconstruction over inventing potentially-wrong detail at this scale factor. This is a known, consistent behavior across test images, not an occasional artifact.
  • Best results on sharp, well-lit, higher-starting-resolution source images.
  • 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-4x,
  title  = {prism-upscaler-4x},
  author = {Olaverse},
  year   = {2026},
  url    = {https://huggingface.co/olaverse/prism-upscaler-4x}
}
Downloads last month
21
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support