Prism Upscaler 4x
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...
Modellquelle
- Art
- Other
- Dateigröße
- 146 KB
- Version
- vRevision 1e7f940
- Aktualisiert
- 9. Okt. 2026
- Downloads
- 7
- Quelle
- Hugging Face
Quellenbeschreibung
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}
}
Quellen
1 Quelle
Quellen
1 QuelleVerifiziert 9. Okt.
Modellartefakte
1 Artefakt
Modellartefakte
1 ArtefaktQuellenauszüge
3 Auszüge
Quellenauszüge
3 Auszüge--- license: apache-2.0 tags: - image-to-image - super-resolution - pytorch - prism --- # prism-upscaler-4x  **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 ```python 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 pr...
Source context: 7 downloads · 0 likes · Pipeline image-to-image · Repo olaverse/prism-upscaler-4x
Source context: 44 downloads · 0 likes · Pipeline image-to-image · Repo olaverse/prism-upscaler-4x
