/ Модель

Характеристики

Лицензия
CC BY 4.0
Библиотека
coreml
Опубликована
8 апр 2026

PiperSR-2x

Преобразование изображенийИзображение, текст → изображение3 профессии

Компактная модель Core ML для двукратного увеличения разрешения изображений и видеокадров на Apple Neural Engine.

96скачиваний за 30 дней4лайкавеса обновлены21 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

PiperSR-2x — модель сверхразрешения изображений от разработчика ModelPiper, спроектированная для Apple Neural Engine и поставляемая в формате Core ML. Она увеличивает разрешение в 2 раза; варианты предназначены для обработки статичных изображений по тайлам и видеокадров целиком. Архитектура содержит 453 тыс. параметров: шесть остаточных блоков с 64 каналами, BatchNorm и SiLU, а увеличение выполняется через PixelShuffle. Модель использует Float16; размер основного пакета составляет 928 КБ. Для видео на M2 Max заявлена скорость 44,4 кадра/с при увеличении 360p до 720p.

Модель обучена на LSDIR и DIV2K. В опубликованных тестах она превосходит FSRCNN, но уступает SAFMN и SPAN-S; результаты для Urban100 не приведены, поскольку изображения этого тестового набора случайно попали в обучающие данные. Для запуска требуются macOS и устройство Apple Silicon с Core ML; README рекомендует использовать `.cpuAndNeuralEngine`. Лицензия — CC BY 4.0.

Сценарии применения

  • увеличение разрешения фотографий в 2 раза
  • апскейлинг кадров видео на Mac с Apple Silicon
  • повышение разрешения веб-видео в реальном времени
  • обработка изображений по тайлам в приложении для macOS

Ограничения

Запуск ориентирован на macOS и Apple Silicon с Core ML. Для Urban100 качество не оценено, поскольку тестовые изображения этого набора случайно использовались при обучении.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

PiperSR-2x: ANE-Native Super Resolution for Apple Silicon

Real-time 2x AI upscaling on Apple's Neural Engine. 44.4 FPS for 360p → 720p video on M2 Max, 928 KB model, every op runs natively on ANE with zero CPU/GPU fallback.

Not a converted PyTorch model — an architecture designed from ANE hardware measurements. Every dimension, operation, and data type is dictated by Neural Engine characteristics.

Key Results

ModelParamsSet5Set14BSD100Urban100
Bicubic—33.6630.2429.5626.88
FSRCNN12K37.0032.6331.5329.88
SAFMN228K38.0033.5432.1631.84
SPAN-S411K38.0633.7332.2132.20
PiperSR453K37.5433.1631.99—

2x, Y-channel PSNR (dB). PiperSR scores are for the shipped CoreML model and reproduce with benchmark.py on GitHub. Other scores are from each model's paper; the full table with sources is on GitHub. PiperSR has no Urban100 score because Urban100's test images were accidentally included in its training data.

Beats FSRCNN on every benchmark reported. Within 0.46 dB of SAFMN and 0.52 dB of SPAN-S on Set5, the cost of designing for the ANE instead of the GPU.

Performance

ConfigurationFPSHardwareNotes
Full-frame 640×360 → 1280×72044.4M2 MaxPiperSR_2x_video_720p, ANE predict 22.5 ms
Full-frame 854×480 → 1708×96030.0M2 MaxPiperSR_2x_video_720p, ANE predict 32.7 ms
Full-frame 1280×720 → 2560×144014.0M2 MaxPiperSR_2x_video_720p, ANE predict 71.6 ms
128×128 tiles (static weights)125.6M2Baked weights, 2.82× vs dynamic
128×128 tiles (dynamic weights)44.5M2CoreML default

Real-time 2× upscaling of 360p video (44.4 FPS on M2 Max). The ANE sits idle during video playback — PiperSR puts it to work.

Architecture

453K-parameter network: 6 residual blocks at 64 channels with BatchNorm and SiLU activations, upscaling via PixelShuffle.

Input (128×128×3 FP16)
  → Head: Conv 3×3 (3 → 64)
  → Body: 6× ResBlock [Conv 3×3 → BatchNorm → SiLU → Conv 3×3 → BatchNorm → Residual Add]
  → Tail: Conv 3×3 (64 → 12) → PixelShuffle(2)
Output (256×256×3)

Compiles to five network ops: conv, silu, add, pixel_shuffle and clip (BatchNorm is fused into the convolutions at export). CoreML's compute plan places every one of them on the ANE.

Why ANE-native matters

Off-the-shelf super resolution models (SPAN, Real-ESRGAN) were designed for CUDA GPUs and converted to CoreML after the fact. They waste the ANE:

  • Misaligned channels (48 instead of 64) waste 25%+ of each ANE tile
  • Monolithic full-frame tensors serialize the ANE's parallel compute lanes
  • Silent CPU fallback from unsupported ops can 5-10× latency
  • No batched tiles means 60× dispatch overhead

PiperSR addresses every one of these by designing around ANE constraints.

Model Variants

FileUse CaseInput → OutputI/O type
PiperSR_2x.mlpackageStatic images (128px tiles)128×128 → 256×256Image (input_image → output_image)
PiperSR_2x_256.mlpackageStatic images (256px tiles)256×256 → 512×512Image (input_image → output_image)
PiperSR_2x_video_720p.mlpackageVideo frames (full-frame)640×360, 854×480 or 1280×720 (and portrait) → 2×Float array, NCHW, [0, 1] (input → clip_0)

The tile models take any image size by splitting it into tiles. The pipersr Python package does this for you.

Usage

With ToolPiper Studio (recommended)

PiperSR is integrated into ToolPiper Studio, a local macOS AI toolkit. Install ToolPiper, enable the MediaPiper browser extension, and 360p web video is upscaled to 720p in real time.

# Via MCP tool (pass model, or ToolPiper uses its default 4x upscaler)
mcp__toolpiper__image_upscale image=/path/to/image.png model=pipersr-2x

# Via REST API (needs a ToolPiper developer token)
curl -X POST http://127.0.0.1:9998/v1/images/upscale \
  -H "Authorization: Bearer $TOOLPIPER_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"image\":\"$(base64 -i input.png)\",\"model\":\"pipersr-2x\"}" \
  -o upscaled.png

With CoreML (Swift)

import CoreML

let config = MLModelConfiguration()
config.computeUnits = .cpuAndNeuralEngine  // NOT .all — .all is 23.6% slower

let model = try PiperSR_2x(configuration: config)
let input = PiperSR_2xInput(input_image: pixelBuffer)  // 128×128 CVPixelBuffer
let output = try model.prediction(input: input)
// output.output_image is the 256×256 upscaled tile

Important: Use .cpuAndNeuralEngine, not .all. CoreML's .all silently misroutes pure-ANE ops onto the GPU, causing a 23.6% slowdown for this model.

With Python (pip)

pip install pipersr
pipersr -i photo.png -o photo_2x.png
from pipersr import upscale

upscale("photo.png").save("photo_2x.png")

The package bundles PiperSR_2x.mlpackage and handles tiling, so images of any size work.

With coremltools (Python)

import coremltools as ct
from PIL import Image

model = ct.models.MLModel(
    "PiperSR_2x.mlpackage",
    compute_units=ct.ComputeUnit.CPU_AND_NE,
)

tile = Image.open("input.png").convert("RGB").crop((0, 0, 128, 128))
result = model.predict({"input_image": tile})["output_image"]  # 256×256 PIL image
result.save("tile_2x.png")

Training

Trained on LSDIR + DIV2K (85,791 images) with L1 + wavelet (SWT) loss, random flips and rotations, and progressive patch sizes (64 → 128 px). Urban100's 100 test images were also included in the training data by mistake, so no Urban100 score is reported. Total training cost: ~$6 on RunPod A6000 instances. Full training journey documented from 33.46 dB to 37.54 dB across 12 experiment findings.

Technical Details

  • Compute units: .cpuAndNeuralEngine (ANE primary, CPU for I/O only)
  • Precision: Float16
  • Input format: RGB image for the tile models; NCHW float array in [0, 1] for the video model
  • Output format: RGB image for the tile models; NCHW float array in [0, 1] for the video model
  • Model size: 928 KB (PiperSR_2x.mlpackage)
  • Parameters: 453K
  • ANE ops used: conv (BatchNorm fused), silu, add, pixel_shuffle, clip
  • CPU fallback ops: None in the network. The tile models scale the input image on CPU

License

The model weights are CC BY 4.0 — fully permissive. Use them for anything: personal, academic, or commercial. Ship them in your app, build a product, make money with it. The only ask: link back to ModelPiper.com as attribution.

Powered by PiperSR from ModelPiper — https://modelpiper.com

Links

Citation

@software{pipersr2026,
  author = {Racicot, Ben},
  title = {PiperSR: Real-Time Super-Resolution for Apple Neural Engine},
  year = {2026},
  url = {https://github.com/ModelPiper/PiperSR},
  note = {453K parameters, 928 KB CoreML. Available at https://modelpiper.com}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · coreml

Нельзя запустить

CoreML-модели работают только на устройствах Apple.

Ревизия весов
7bc566a

0 моделей