Real-ESRGAN x4plus anime 6B (RRDBNet 6 blocks)
Image super resolution model for onnxruntime-web (fp16). Runs on WebGPU or WASM —
8.6 MB downloaded once from models.skillsafe.ai, then cached for every SkillSafe app that
uses it. Inference happens on your device; nothing you enter is uploaded to load it, and it never costs a credit.
Weights from Hugging Face · skillsafe-ai/realesrgan-x4plus-anime-6b, pinned at c001be50fae1 — also loadable straight from Hugging Face outside SkillSafe (how).
Details
[email protected]c001be50fae1c7a2bae8b2b4dec5e6fcbdbcca96Files
Each file is served at an immutable URL; the canonical form is the SHA-256 itself. Tokenizer and config JSON are not here by design — they ship in your app bundle.
| Path | Format | Size | SHA-256 | |
|---|---|---|---|---|
model_fp16.onnx | onnx | 8.6 MB | 1777c7dffecd…b7ddbf |
Signature
Graph inputs and outputs read from the ONNX bytes at vetting — the tensor names your session.run() call feeds and reads. Symbolic dimensions are shown by name.
Inputs
inputfloat32 [batch, 3, height, width]
Outputs
outputfloat32 [batch, 3, height_x4, width_x4]
Use it in an app declaration · SDK loader · onnxruntime-web · URLs · Hugging Face — generated from this entry
Add to the body of POST /v1/apps/{slug}/releases (or a release session). An unknown or withdrawn model is refused with a 400 naming it; the app page then shows "downloads 8.6 MB · runs on your device" and /models.txt carries the attribution.
{
"models": [
{
"id": "realesrgan-x4plus-anime-6b-fp16",
"revision": "v0.2.2.4"
}
]
} Streams with progress, verifies the SHA-256 against the catalogue, keeps a durable copy in the app's Cache API and reports whether the bytes came from cache or the network.
<script src="/sdk.js"></script> <!-- vendored from https://skillsafe.ai/apps-sdk/v1.js -->
const ss = SkillSafe.init({ slug: "your-app" });
const caps = await ss.models.capabilities(); // { webgpu, wasm, wasmSimd, storage }
const bytes = await ss.models.load("[email protected]", "model_fp16.onnx", {
onProgress: (p) => (bar.style.width = Math.round(p.ratio * 100) + "%"),
}); // ArrayBuffer — SHA-256 verified, cached
// Later visits: await ss.models.status("[email protected]") → { cached: [...], missing: [] }
// Background prefetch on a landing page: ss.models.warm("[email protected]") The runtime itself ships in your bundle as a vetted {path, sha256} reference — only the weights come from the registry. Pass the bytes in; do not re-fetch by URL.
// onnxruntime-web 1.17.0 ships in your bundle as a vetted {path, sha256} reference —
// dist/ort.wasm.bundle.min.mjs + dist/ort-wasm-simd-threaded.wasm (or the .jsep pair for WebGPU).
import * as ort from "./ort.wasm.bundle.min.mjs";
ort.env.wasm.wasmPaths = { wasm: "/ort-wasm-simd-threaded.wasm" }; // object form, never a prefix string
ort.env.wasm.numThreads = 1; // app hosts have no COOP/COEP
const bytes = await ss.models.load("[email protected]", "model_fp16.onnx", { onProgress });
const session = await ort.InferenceSession.create(new Uint8Array(bytes), {
executionProviders: ["webgpu", "wasm"],
});
// Feeds are named after the graph inputs (read from the file, see the signature above):
const feeds = {
"input": new ort.Tensor("float32", new Float32Array(n), [/* batch */ 1, 3, /* height */ 1, /* width */ 1]),
};
const out = await session.run(feeds);
const output = out["output"].data; // float32 [batch, 3, height_x4, width_x4] Immutable, credential-free, Access-Control-Allow-Origin: *, range requests honoured. The host refuses requests carrying a foreign Origin; a plain curl is fine.
https://models.skillsafe.ai/[email protected]/model_fp16.onnx curl -sSL -o model_fp16.onnx "https://models.skillsafe.ai/[email protected]/model_fp16.onnx"
shasum -a 256 model_fp16.onnx # 1777c7dffecdf356c234e3387d456a196ed9b72f9f14ed96bc097b9798b7ddbf SkillSafe's copy on Hugging Face — the same bytes (the SHA-256 on each file page matches the hash above), plus manifest.json with the upstream commit, recipe and toolchain, the parity reference tensors and a model card. Use it directly for your own site or notebook. A SkillSafe app must load from the registry: its CSP allows models.skillsafe.ai only, and that copy is what the SDK verifies, the browser shares across apps and the app page discloses. SkillSafe keeps hosting its own copies and the API either way.
// Outside SkillSafe apps only: app hosts allow connect-src models.skillsafe.ai, not huggingface.co.
// Same bytes as the registry copy — the SHA-256 on the Hugging Face file page is 1777c7dffecdf356…
const res = await fetch("https://huggingface.co/skillsafe-ai/realesrgan-x4plus-anime-6b/resolve/c001be50fae1c7a2bae8b2b4dec5e6fcbdbcca96/model_fp16.onnx");
const bytes = new Uint8Array(await res.arrayBuffer());
const session = await ort.InferenceSession.create(bytes, { executionProviders: ["webgpu", "wasm"] }); https://huggingface.co/skillsafe-ai/realesrgan-x4plus-anime-6b/resolve/c001be50fae1c7a2bae8b2b4dec5e6fcbdbcca96/model_fp16.onnx Evaluation
onnxruntime CPU vs PyTorch fp32 reference, seeded uniform input — converted by SkillSafe from the upstream checkpoint; a second run produced byte-identical files. Evaluated Sep 22, 2026.
Parity against PyTorch model from the upstream checkpoint (fp32, CPU) · output
| file | precision | max abs | mean abs | cosine / PSNR |
|---|---|---|---|---|
model.onnx | fp32 | 3.3e-6 | 4.4e-7 | 125.0 dB |
model.onnx | fp32 | 3.0e-6 | 4.3e-7 | 125.3 dB |
model_fp16.onnx | fp16 | 7.2e-4 | 1.7e-4 | 73.6 dB |
model_fp16.onnx | fp16 | 1.0e-3 | 1.5e-4 | 74.2 dB |
Toolchain: python 3.12.13 · platform Darwin 25.6.0 arm64 · torch 2.10.0 · onnx 1.23.0 · onnxruntime 1.30.0. Recipe models/recipes/realesrgan-x4plus-anime-6b.yaml (56cb0c56f623). Full manifest.json
Licence & attribution
BSD-3-Clause · licence text · notice
Real-ESRGAN RealESRGAN_x4plus_anime_6B weights and RRDBNet architecture: Copyright (c) 2021, Xintao Wang. BSD 3-Clause License. https://github.com/xinntao/Real-ESRGAN
Apps that declare this model get this text in their generated /models.txt, so a licence that requires a notice always carries one.
Every file here was approved by exact SHA-256 after a structural audit of the graph, fetched from a content-pinned source, and is served credential-free at an immutable URL. The SDK re-verifies the hash on your device before it caches or returns anything. Missing a variant? Request it — or read how the registry works.