Incorporo-user commited on
Commit
7a7d8dc
·
verified ·
1 Parent(s): c55a31d

Agate WebGPU: static in-browser demo with ONNX models

Browse files
README.md CHANGED
@@ -1,10 +1,53 @@
1
  ---
2
- title: Agate Webgpu
3
- emoji: 🦀
4
- colorFrom: pink
5
- colorTo: green
6
  sdk: static
 
7
  pinned: false
 
 
 
 
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Agate WebGPU
3
+ colorFrom: red
4
+ colorTo: gray
 
5
  sdk: static
6
+ app_file: index.html
7
  pinned: false
8
+ license: mit
9
+ short_description: Agate text-to-image, 100% in your browser on WebGPU
10
+ custom_headers:
11
+ cross-origin-embedder-policy: require-corp
12
+ cross-origin-opener-policy: same-origin
13
+ cross-origin-resource-policy: cross-origin
14
  ---
15
 
16
+ # Agate WebGPU
17
+
18
+ Agate Preview 001, LogoLabs' 0.26B text-to-image model (a 191M flow generator with a 68M text encoder),
19
+ running as a static page. The tokenizer, text encoder, 50-step flow sampler with classifier-free guidance
20
+ and the TAESD decoder all run on your own GPU through WebGPU (onnxruntime-web).
21
+
22
+ **Runs entirely in your browser — prompts never leave your machine.** There is no server and no API call.
23
+
24
+ ## Requirements
25
+
26
+ - A browser with WebGPU: a recent Chrome or Edge (113+). Safari and Firefox may lack WebGPU or need it
27
+ enabled in their settings; without it the page offers a WebAssembly (CPU) path that works but takes
28
+ minutes per image.
29
+ - First load downloads about **530 MB** of weights (generator 385 MB, text encoder 137 MB, decoder 5 MB,
30
+ tokenizer 4 MB). They are kept in the browser's Cache Storage, so later visits load from disk.
31
+
32
+ ## Speed and accuracy
33
+
34
+ - About 6–8 s per 50-step 256×256 image on an RTX 4060, after roughly 10 s of one-time model
35
+ setup per visit.
36
+ - With identical initial noise, the browser output matches the PyTorch reference pipeline within 5/255
37
+ per pixel (run the self-test with `?parity=1`).
38
+ - Seeds use a JavaScript PRNG, so a seed gives the same image in every browser but not the same image as
39
+ the PyTorch pipeline with that seed.
40
+
41
+ Query parameters: `?autoload=1` loads the model immediately, `?ep=wasm` forces the CPU backend,
42
+ `?parity=1` runs the parity self-test.
43
+
44
+ ## Links
45
+
46
+ - [logolabs.org](https://logolabs.org)
47
+ - [huggingface.co/Logolabs](https://huggingface.co/Logolabs)
48
+ - Model card: Logolabs/agate-preview-001
49
+
50
+ Licence: MIT.
51
+
52
+ We acknowledge EuroHPC JU for awarding the project ID EHPC-AIF-2026PG01-907 access to resources on
53
+ Arrhenius GPU at NAISS, Sweden.
assets/agate-a.svg ADDED
assets/agate-lockup.svg ADDED
assets/agate-wordmark.svg ADDED
assets/logolabs-mark.svg ADDED
css/style.css ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ :root {
2
+ --paper: #FCFCF7;
3
+ --ink: #0B0A08;
4
+ --red: #F4291F;
5
+ --mute: #6B6862;
6
+ --hair: 1.5px solid var(--ink);
7
+ --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
8
+ --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
9
+ --head: "Inter Tight", "Inter", system-ui, sans-serif;
10
+ }
11
+ * { box-sizing: border-box; }
12
+ [hidden] { display: none !important; }
13
+ html, body { margin: 0; background: var(--paper); color: var(--ink); }
14
+ body { font: 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
15
+ a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
16
+ a:hover { color: var(--red); }
17
+
18
+ .page { max-width: 1080px; margin: 0 auto; padding: 28px 24px 40px; }
19
+ .rule { border: 0; border-top: var(--hair); margin: 22px 0; }
20
+
21
+ .label { font: 500 11.5px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
22
+ .label.dim { color: var(--mute); }
23
+ .label b { font-weight: 600; color: var(--red); letter-spacing: .06em; }
24
+ .sq { display: inline-block; width: 8px; height: 8px; background: var(--ink); flex: none; }
25
+ .sq.red { background: var(--red); }
26
+
27
+ .mast { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
28
+ .mast-left { display: flex; align-items: flex-end; gap: 22px; }
29
+ .lockup { height: 96px; width: auto; display: block; }
30
+ .mast-meta { display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; }
31
+ .imprint { display: flex; align-items: center; gap: 10px; text-decoration: none; padding-bottom: 6px; }
32
+
33
+ .intro h1 { font: 800 clamp(34px, 5.4vw, 58px)/1.02 var(--head); letter-spacing: -.02em; margin: 6px 0 12px; }
34
+ .intro p { max-width: 62ch; margin: 0; color: #2a2824; }
35
+
36
+ .notice { border: var(--hair); padding: 16px 18px; margin: 22px 0 0; background: #fff; }
37
+ .notice p { margin: 8px 0; }
38
+ .notice.ok { border-color: var(--ink); }
39
+
40
+ .grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 26px; }
41
+ @media (max-width: 820px) { .grid { grid-template-columns: 1fr; } .lockup { height: 72px; } }
42
+
43
+ .panel { border-top: var(--hair); padding-top: 14px; }
44
+ textarea, input[type=number] {
45
+ width: 100%; font: 16px/1.45 var(--sans); color: var(--ink); background: #fff;
46
+ border: var(--hair); border-radius: 0; padding: 10px 12px; margin-top: 8px; resize: vertical;
47
+ }
48
+ textarea:focus, input:focus { outline: 2px solid var(--red); outline-offset: 1px; }
49
+
50
+ .examples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 18px; }
51
+ .chip { font: 13px/1.2 var(--sans); background: transparent; border: 1px solid var(--ink); padding: 5px 9px; cursor: pointer; color: var(--ink); text-align: left; }
52
+ .chip:hover { background: var(--ink); color: var(--paper); }
53
+
54
+ .row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }
55
+ @media (max-width: 480px) { .row { grid-template-columns: 1fr; } }
56
+ .field { display: flex; flex-direction: column; }
57
+ .seed-row { display: flex; gap: 6px; align-items: stretch; }
58
+ .seed-row input { margin-top: 8px; }
59
+ input[type=range] { width: 100%; margin-top: 16px; accent-color: var(--red); }
60
+
61
+ .btn { font: 600 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; border: var(--hair); background: var(--paper); color: var(--ink); padding: 14px 18px; cursor: pointer; border-radius: 0; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
62
+ .btn.primary { width: 100%; background: var(--ink); color: var(--paper); }
63
+ .btn.primary:hover:not(:disabled) { background: var(--red); border-color: var(--red); }
64
+ .btn:disabled { opacity: .45; cursor: default; }
65
+ .btn.icon { margin-top: 8px; padding: 0 12px; font-size: 18px; letter-spacing: 0; }
66
+ .btn.ghost:hover { background: var(--ink); color: var(--paper); }
67
+ .btn.small { padding: 9px 12px; font-size: 11px; }
68
+
69
+ .progress { margin-top: 16px; }
70
+ .bar { height: 8px; border: var(--hair); background: #fff; }
71
+ #bar-fill { height: 100%; width: 0; background: var(--red); transition: width .12s linear; }
72
+ .progress-text { display: flex; justify-content: space-between; margin-top: 8px; gap: 12px; }
73
+
74
+ .out-head, .out-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
75
+ .out-foot { align-items: flex-start; margin-top: 12px; }
76
+ .toggle { cursor: pointer; }
77
+ .toggle input { accent-color: var(--red); margin: 0; }
78
+ .frame { position: relative; margin-top: 10px; border: var(--hair); background: #fff; aspect-ratio: 1 / 1; width: 100%; }
79
+ #canvas { width: 100%; height: 100%; display: block; image-rendering: auto; }
80
+ .frame.crisp #canvas { image-rendering: pixelated; }
81
+ .placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: var(--paper); }
82
+ .placeholder img { width: 28%; opacity: .14; }
83
+ .frame.busy .placeholder img { animation: pulse 1.2s ease-in-out infinite; }
84
+ @keyframes pulse { 50% { opacity: .32; } }
85
+
86
+ .timings { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 0; font: 12px/1.5 var(--mono); }
87
+ .timings dt { color: var(--mute); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
88
+ .timings dd { margin: 0; }
89
+
90
+ .foot p { margin: 0 0 8px; }
91
+ .foot .strong { font: 700 18px/1.3 var(--head); }
92
+ .foot .label { display: flex; flex-wrap: wrap; gap: 4px 8px; }
93
+ @media (max-width: 520px) {
94
+ .page { padding: 20px 16px 32px; }
95
+ .mast-meta .label.dim { display: none; }
96
+ .progress-text { flex-wrap: wrap; }
97
+ }
index.html CHANGED
@@ -1,19 +1,113 @@
1
  <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
  <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Agate Preview 001 — in your browser</title>
7
+ <meta name="description" content="Agate Preview 001, LogoLabs' 0.26B text-to-image model, running entirely in your browser on WebGPU.">
8
+ <link rel="icon" href="assets/agate-a.svg" type="image/svg+xml">
9
+ <link rel="preconnect" href="https://fonts.googleapis.com">
10
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
+ <link crossorigin="anonymous" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&family=Inter+Tight:wght@700;800&display=swap" rel="stylesheet">
12
+ <link rel="stylesheet" href="css/style.css">
13
+ </head>
14
+ <body>
15
+ <div class="page">
16
+ <header class="mast">
17
+ <div class="mast-left">
18
+ <img class="lockup" src="assets/agate-lockup.svg" alt="Agate">
19
+ <div class="mast-meta">
20
+ <span class="label"><i class="sq"></i>Preview 001</span>
21
+ <span class="label dim">0.26B · text-to-image · 256 px</span>
22
+ </div>
23
+ </div>
24
+ <a class="imprint" href="https://logolabs.org" target="_blank" rel="noopener">
25
+ <img src="assets/logolabs-mark.svg" alt="" width="22" height="30">
26
+ <span class="label">LogoLabs</span>
27
+ </a>
28
+ </header>
29
+ <hr class="rule">
30
+
31
+ <section class="intro">
32
+ <h1>Agate, in your browser.</h1>
33
+ <p>A 191M-parameter flow model with a 68M text encoder, running on your own GPU through WebGPU.
34
+ The first visit downloads the weights once (<span id="dl-size">530 MB</span>); after that they load from the browser cache.</p>
35
+ </section>
36
+
37
+ <div id="nogpu" class="notice" hidden>
38
+ <span class="label"><i class="sq red"></i>WebGPU unavailable</span>
39
+ <p id="nogpu-why"></p>
40
+ <p>Agate needs WebGPU for usable speed: use a recent Chrome or Edge (113+) on Windows, macOS or ChromeOS,
41
+ or Chrome on Android 121+; on Linux and in Firefox/Safari WebGPU may have to be enabled in the browser's flags.
42
+ You can still run it on the CPU (WebAssembly) — correct, but several minutes per image.</p>
43
+ <button id="use-wasm" class="btn ghost">Run on CPU instead</button>
44
+ </div>
45
+
46
+ <main class="grid">
47
+ <section class="panel controls">
48
+ <label class="label" for="prompt">Prompt</label>
49
+ <textarea id="prompt" rows="3" spellcheck="false">a green teapot and a red cup on a table</textarea>
50
+ <div class="examples" id="examples">
51
+ <span class="label dim">Try</span>
52
+ </div>
53
+
54
+ <div class="row">
55
+ <div class="field">
56
+ <label class="label" for="seed">Seed</label>
57
+ <div class="seed-row">
58
+ <input id="seed" type="number" min="0" max="4294967295" step="1" value="0">
59
+ <button id="dice" class="btn icon" title="Random seed" aria-label="Random seed">⟳</button>
60
+ </div>
61
+ </div>
62
+ <div class="field">
63
+ <label class="label" for="steps">Steps <b id="steps-v">50</b></label>
64
+ <input id="steps" type="range" min="4" max="50" step="1" value="50">
65
+ </div>
66
+ <div class="field">
67
+ <label class="label" for="cfg">CFG <b id="cfg-v">3.0</b></label>
68
+ <input id="cfg" type="range" min="1" max="8" step="0.5" value="3">
69
+ </div>
70
+ </div>
71
+
72
+ <button id="go" class="btn primary" disabled>Load model</button>
73
+
74
+ <div class="progress" aria-live="polite">
75
+ <div class="bar"><div id="bar-fill"></div></div>
76
+ <div class="progress-text"><span id="status" class="label">Idle</span><span id="status-r" class="label dim"></span></div>
77
+ </div>
78
+ </section>
79
+
80
+ <section class="panel output">
81
+ <div class="out-head">
82
+ <span class="label"><i class="sq"></i>Output · 256 × 256</span>
83
+ <label class="label toggle"><input type="checkbox" id="crisp"> Crisp pixels</label>
84
+ </div>
85
+ <div class="frame" id="frame">
86
+ <canvas id="canvas" width="256" height="256"></canvas>
87
+ <div class="placeholder" id="placeholder">
88
+ <img src="assets/agate-a.svg" alt="">
89
+ </div>
90
+ </div>
91
+ <div class="out-foot">
92
+ <dl class="timings" id="timings"></dl>
93
+ <a id="save" class="btn ghost small" download="agate.png" hidden>Save PNG</a>
94
+ </div>
95
+ </section>
96
+ </main>
97
+
98
+ <div id="parity" class="notice" hidden></div>
99
+
100
+ <hr class="rule">
101
+ <footer class="foot">
102
+ <p class="strong">Runs entirely in your browser on WebGPU — nothing leaves your machine.</p>
103
+ <p class="label dim">
104
+ <a href="https://logolabs.org" target="_blank" rel="noopener">logolabs.org</a> ·
105
+ <a href="https://huggingface.co/Logolabs" target="_blank" rel="noopener">huggingface.co/Logolabs</a> ·
106
+ MIT licence · <span id="backend">backend: —</span>
107
+ </p>
108
+ </footer>
109
+ </div>
110
+ <script src="js/config.js"></script>
111
+ <script type="module" src="js/app.js"></script>
112
+ </body>
113
  </html>
js/agate.js ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Agate Preview 001 in the browser: tokenizer (tokenizers.js) + three ONNX graphs run by
2
+ // onnxruntime-web (WebGPU, WASM fallback) + a 50-step Euler flow sampler with CFG.
3
+ // Mirrors agate/pipeline.py (AgatePipeline) of Logolabs/agate-preview-001.
4
+
5
+ import * as ort from "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.30.0/dist/ort.webgpu.bundle.min.mjs";
6
+ import { Tokenizer } from "https://cdn.jsdelivr.net/npm/@huggingface/tokenizers@0.2.0/dist/tokenizers.mjs";
7
+
8
+ export { ort };
9
+
10
+ const BUCKETS = [64, 128, 256, 512];
11
+ const CACHE_NAME = "agate-preview-001-web";
12
+ const MODEL_FILES = ["tokenizer.json", "tokenizer_config.json", "text_encoder.onnx", "generator.onnx", "taesd_decoder.onnx"];
13
+
14
+ export async function webgpuStatus() {
15
+ if (!("gpu" in navigator)) return { ok: false, why: "This browser does not expose WebGPU (navigator.gpu is missing)." };
16
+ try {
17
+ const adapter = await navigator.gpu.requestAdapter({ powerPreference: "high-performance" });
18
+ if (!adapter) return { ok: false, why: "WebGPU is present but no GPU adapter is available." };
19
+ let name = "";
20
+ try { const info = adapter.info || (await adapter.requestAdapterInfo?.()); name = [info?.vendor, info?.architecture, info?.description].filter(Boolean).join(" "); } catch { /* optional */ }
21
+ return { ok: true, adapter: name, maxBuffer: adapter.limits?.maxBufferSize };
22
+ } catch (e) {
23
+ return { ok: false, why: `WebGPU adapter request failed: ${e.message || e}` };
24
+ }
25
+ }
26
+
27
+ // ---- downloads with progress + Cache Storage ---------------------------------------------------
28
+ async function openCache() {
29
+ try { return await caches.open(CACHE_NAME); } catch { return null; } // file://, private mode, ...
30
+ }
31
+
32
+ async function fetchCached(url, key, expectBytes, onBytes) {
33
+ const cache = await openCache();
34
+ if (cache) {
35
+ const hit = await cache.match(key);
36
+ if (hit) { const buf = new Uint8Array(await hit.arrayBuffer()); onBytes(buf.byteLength, true); return { buf, cached: true }; }
37
+ }
38
+ const res = await fetch(url);
39
+ if (!res.ok) throw new Error(`${url}: HTTP ${res.status}`);
40
+ // manifest size first: a compressed response would report the encoded length
41
+ const total = expectBytes || Number(res.headers.get("content-length")) || 0;
42
+ const reader = res.body.getReader();
43
+ let buf = new Uint8Array(total || 1 << 20), n = 0;
44
+ for (;;) {
45
+ const { done, value } = await reader.read();
46
+ if (done) break;
47
+ if (n + value.byteLength > buf.byteLength) { const b2 = new Uint8Array(Math.max(buf.byteLength * 2, n + value.byteLength)); b2.set(buf.subarray(0, n)); buf = b2; }
48
+ buf.set(value, n); n += value.byteLength; onBytes(value.byteLength, false);
49
+ }
50
+ buf = n === buf.byteLength ? buf : buf.slice(0, n);
51
+ if (cache) {
52
+ try { await cache.put(key, new Response(buf, { headers: { "content-type": "application/octet-stream", "content-length": String(n) } })); }
53
+ catch (e) { console.warn("cache put failed (quota?)", e); }
54
+ }
55
+ return { buf, cached: false };
56
+ }
57
+
58
+ export async function hasCachedModel() {
59
+ try { const c = await caches.open(CACHE_NAME); return (await c.keys()).length >= MODEL_FILES.length; } catch { return false; }
60
+ }
61
+
62
+ export async function clearCache() { try { return await caches.delete(CACHE_NAME); } catch { return false; } }
63
+
64
+ // ---- the model ---------------------------------------------------------------------------------
65
+ export class Agate {
66
+ constructor({ base = "./models/", ep = "webgpu", variant = null, optLevel = "all" } = {}) {
67
+ this.optLevel = optLevel;
68
+ this.base = base.endsWith("/") ? base : base + "/";
69
+ this.ep = ep;
70
+ this.variant = variant; // e.g. "full16": fp16-compute generator (experimental)
71
+ }
72
+
73
+ // onProgress({loaded, total, file, phase})
74
+ async load(onProgress = () => {}) {
75
+ const manifest = await (await fetch(this.base + "manifest.json", { cache: "no-cache" })).json();
76
+ this.manifest = manifest;
77
+ const swap = (this.variant && manifest.variants?.[this.variant]) || {};
78
+ const real = (f) => swap[f] || f;
79
+ const total = MODEL_FILES.reduce((s, f) => s + manifest.files[real(f)].bytes, 0);
80
+ let loaded = 0, fromCache = 0;
81
+ const bufs = {};
82
+ const t0 = performance.now();
83
+ for (const f of MODEL_FILES) {
84
+ const meta = manifest.files[real(f)];
85
+ const key = new Request(`${this.base}${real(f)}?sha256=${meta.sha256}`);
86
+ const { buf, cached } = await fetchCached(this.base + real(f), key, meta.bytes, (b, c) => {
87
+ loaded += b; if (c) fromCache += b; onProgress({ phase: "download", file: f, loaded, total });
88
+ });
89
+ bufs[f] = buf;
90
+ }
91
+ this.stats = { downloadMB: total / 1e6, fromCacheMB: fromCache / 1e6, downloadMs: performance.now() - t0 };
92
+ // drop cached files of older model versions (keys carry the sha256)
93
+ try {
94
+ const cache = await openCache(), keep = new Set(MODEL_FILES.map((f) => new URL(`${this.base}${real(f)}?sha256=${manifest.files[real(f)].sha256}`, location.href).href));
95
+ if (cache) for (const req of await cache.keys()) if (!keep.has(req.url)) await cache.delete(req);
96
+ } catch (e) { console.warn("cache cleanup", e); }
97
+ const dec = new TextDecoder();
98
+ this.tok = new Tokenizer(JSON.parse(dec.decode(bufs["tokenizer.json"])), JSON.parse(dec.decode(bufs["tokenizer_config.json"])));
99
+
100
+ if (this.ep === "wasm") {
101
+ ort.env.wasm.numThreads = self.crossOriginIsolated ? Math.min(8, navigator.hardwareConcurrency || 4) : 1;
102
+ }
103
+ const opts = { executionProviders: [this.ep], graphOptimizationLevel: this.optLevel };
104
+ const t1 = performance.now();
105
+ this.sessions = {};
106
+ for (const [name, f] of [["text", "text_encoder.onnx"], ["gen", "generator.onnx"], ["vae", "taesd_decoder.onnx"]]) {
107
+ onProgress({ phase: "init", file: f, loaded: total, total });
108
+ const ts = performance.now();
109
+ this.sessions[name] = await ort.InferenceSession.create(bufs[f], opts);
110
+ this.stats[`${name}SessionMs`] = performance.now() - ts;
111
+ bufs[f] = null;
112
+ }
113
+ this.stats.sessionMs = performance.now() - t1;
114
+ return this.stats;
115
+ }
116
+
117
+ tokenize(text) {
118
+ const max = this.manifest.text_max_len;
119
+ let ids = this.tok.encode(text).ids; // [CLS] ... [SEP], as the HF tokenizer
120
+ if (ids.length > max) ids = ids.slice(0, max - 1).concat(ids[ids.length - 1]); // truncation=True
121
+ return ids;
122
+ }
123
+
124
+ async encode(text) {
125
+ const ids = this.tokenize(text);
126
+ const n = ids.length;
127
+ const feeds = {
128
+ input_ids: new ort.Tensor("int64", BigInt64Array.from(ids, BigInt), [1, n]),
129
+ attention_mask: new ort.Tensor("int64", new BigInt64Array(n).fill(1n), [1, n]),
130
+ };
131
+ const out = await this.sessions.text.run(feeds);
132
+ const h = out.last_hidden_state;
133
+ const data = h.data.slice(); // (1, n, 512) fp32
134
+ h.dispose?.();
135
+ return { data, n };
136
+ }
137
+
138
+ static gaussianNoise(seed, count) {
139
+ // mulberry32 + Box-Muller. Seeds do NOT reproduce PyTorch's torch.randn stream.
140
+ let a = seed >>> 0;
141
+ const rnd = () => { a |= 0; a = (a + 0x6D2B79F5) | 0; let t = Math.imul(a ^ (a >>> 15), 1 | a); t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t; return ((t ^ (t >>> 14)) >>> 0) / 4294967296; };
142
+ const out = new Float32Array(count);
143
+ for (let i = 0; i < count; i += 2) {
144
+ const u1 = Math.max(rnd(), 1e-12), u2 = rnd();
145
+ const r = Math.sqrt(-2 * Math.log(u1));
146
+ out[i] = r * Math.cos(2 * Math.PI * u2);
147
+ if (i + 1 < count) out[i + 1] = r * Math.sin(2 * Math.PI * u2);
148
+ }
149
+ return out;
150
+ }
151
+
152
+ // -> { rgba: Uint8ClampedArray (256*256*4), latent: Float32Array, timings }
153
+ async generate({ prompt, negative = "", seed = 0, steps = 50, cfg = 3.0, noise = null, onStep = () => {}, shouldStop = () => false }) {
154
+ const hw = this.manifest.latent_hw, C = this.manifest.latent_ch, D = this.manifest.ctx_dim;
155
+ const per = C * hw * hw;
156
+ const T = { };
157
+ let t0 = performance.now();
158
+ const c = await this.encode(prompt), u = await this.encode(negative);
159
+ T.textMs = performance.now() - t0;
160
+ const need = Math.max(c.n, u.n);
161
+ const L = BUCKETS.find((b) => b >= need) ?? BUCKETS[BUCKETS.length - 1];
162
+ const ctx = new Float32Array(2 * L * D), mask = new Float32Array(2 * L);
163
+ ctx.set(c.data, 0); ctx.set(u.data, L * D); // zero padding, as F.pad in the pipeline
164
+ mask.fill(1, 0, c.n); mask.fill(1, L, L + u.n);
165
+ const ctxT = new ort.Tensor("float32", ctx, [2, L, D]), maskT = new ort.Tensor("float32", mask, [2, L]);
166
+
167
+ let z = noise ? Float32Array.from(noise) : Agate.gaussianNoise(seed, per);
168
+ const zz = new Float32Array(2 * per), tt = new Float32Array(2);
169
+ const dt = 1 / steps;
170
+ t0 = performance.now();
171
+ const stepMs = [];
172
+ for (let i = 0; i < steps; i++) {
173
+ if (shouldStop()) throw new Error("stopped");
174
+ const ts = performance.now();
175
+ zz.set(z, 0); zz.set(z, per);
176
+ tt[0] = tt[1] = i * dt;
177
+ const out = await this.sessions.gen.run({
178
+ z: new ort.Tensor("float32", zz, [2, C, hw, hw]), t: new ort.Tensor("float32", tt, [2]), ctx: ctxT, mask: maskT,
179
+ });
180
+ const v = out.v.data;
181
+ const zn = new Float32Array(per);
182
+ for (let k = 0; k < per; k++) { const vc = v[k], vu = v[per + k]; zn[k] = z[k] + dt * (vu + cfg * (vc - vu)); }
183
+ out.v.dispose?.();
184
+ z = zn;
185
+ stepMs.push(performance.now() - ts);
186
+ onStep(i + 1, steps, z);
187
+ await new Promise((r) => setTimeout(r, 0)); // let the progress bar paint
188
+ }
189
+ T.samplerMs = performance.now() - t0;
190
+ T.firstStepMs = stepMs[0];
191
+ T.stepMs = stepMs.length > 1 ? (T.samplerMs - stepMs[0]) / (stepMs.length - 1) : stepMs[0];
192
+
193
+ t0 = performance.now();
194
+ const img = await this.sessions.vae.run({ latent: new ort.Tensor("float32", z, [1, C, hw, hw]) });
195
+ const x = img.image.data, H = img.image.dims[2], W = img.image.dims[3];
196
+ const rgba = new Uint8ClampedArray(H * W * 4);
197
+ for (let p = 0; p < H * W; p++) {
198
+ for (let ch = 0; ch < 3; ch++) {
199
+ const val = Math.min(1, Math.max(-1, x[ch * H * W + p]));
200
+ rgba[p * 4 + ch] = Math.round((val + 1) * 127.5);
201
+ }
202
+ rgba[p * 4 + 3] = 255;
203
+ }
204
+ T.decodeMs = performance.now() - t0;
205
+ T.totalMs = T.textMs + T.samplerMs + T.decodeMs;
206
+ T.bucket = L;
207
+ return { rgba, width: W, height: H, latent: z, timings: T };
208
+ }
209
+ }
js/app.js ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Agate, webgpuStatus, clearCache, hasCachedModel } from "./agate.js";
2
+
3
+ // Model location: ?models=<url> overrides; otherwise window.AGATE_MODEL_BASE (js/config.js); default ./models/
4
+ const params = new URLSearchParams(location.search);
5
+ const BASE = params.get("models") || window.AGATE_MODEL_BASE || "./models/";
6
+ const FORCE_EP = params.get("ep"); // "wasm" forces the CPU path
7
+ const PARITY = params.has("parity");
8
+ const VARIANT = params.get("variant"); // "full16": experimental fp16-compute generator
9
+
10
+ const EXAMPLES = [
11
+ "a green teapot and a red cup on a table",
12
+ "a minimalist logo of a fox head, orange, flat design, white background",
13
+ "a dog sitting to the left of a cat",
14
+ "a geometric mountain logo in blue and white",
15
+ "a red cube on top of a blue sphere",
16
+ ];
17
+
18
+ const $ = (id) => document.getElementById(id);
19
+ const ui = {
20
+ prompt: $("prompt"), seed: $("seed"), steps: $("steps"), cfg: $("cfg"), go: $("go"), dice: $("dice"),
21
+ fill: $("bar-fill"), status: $("status"), statusR: $("status-r"), canvas: $("canvas"), frame: $("frame"),
22
+ placeholder: $("placeholder"), timings: $("timings"), save: $("save"), crisp: $("crisp"), backend: $("backend"),
23
+ };
24
+
25
+ let agate = null, ep = FORCE_EP || "webgpu", busy = false, stop = false;
26
+ window.__agate = { state: "idle" }; // read by the automated browser test
27
+
28
+ for (const p of EXAMPLES) {
29
+ const b = document.createElement("button");
30
+ b.className = "chip"; b.textContent = p; b.type = "button";
31
+ b.onclick = () => { ui.prompt.value = p; };
32
+ $("examples").appendChild(b);
33
+ }
34
+ ui.steps.oninput = () => { $("steps-v").textContent = ui.steps.value; };
35
+ ui.cfg.oninput = () => { $("cfg-v").textContent = Number(ui.cfg.value).toFixed(1); };
36
+ ui.dice.onclick = () => { ui.seed.value = Math.floor(Math.random() * 2 ** 31); };
37
+ try { ui.crisp.checked = localStorage.getItem("agate-crisp") === "1"; } catch { /* storage blocked */ }
38
+ const applyCrisp = () => { ui.frame.classList.toggle("crisp", ui.crisp.checked); try { localStorage.setItem("agate-crisp", ui.crisp.checked ? "1" : "0"); } catch { /* */ } };
39
+ ui.crisp.onchange = applyCrisp; applyCrisp();
40
+
41
+ const mb = (b) => (b / 1e6).toFixed(0);
42
+ function setProgress(frac, left, right = "") {
43
+ ui.fill.style.width = `${Math.max(0, Math.min(1, frac)) * 100}%`;
44
+ ui.status.textContent = left; ui.statusR.textContent = right;
45
+ }
46
+ function showTimings(rows) {
47
+ ui.timings.innerHTML = rows.map(([k, v]) => `<dt>${k}</dt><dd>${v}</dd>`).join("");
48
+ }
49
+
50
+ async function load() {
51
+ busy = true; ui.go.disabled = true;
52
+ window.__agate.state = "loading";
53
+ agate = new Agate({ base: BASE, ep, variant: VARIANT, optLevel: params.get("opt") || "all" });
54
+ try {
55
+ const t0 = performance.now();
56
+ const st = await agate.load(({ phase, file, loaded, total }) => {
57
+ if (phase === "download") setProgress(loaded / total, `Downloading ${file}`, `${mb(loaded)} / ${mb(total)} MB`);
58
+ else setProgress(1, `Preparing ${file} on ${ep === "webgpu" ? "WebGPU" : "CPU"}`, `${mb(total)} MB`);
59
+ });
60
+ const loadMs = performance.now() - t0;
61
+ $("dl-size").textContent = `${st.downloadMB.toFixed(0)} MB`;
62
+ ui.backend.textContent = `backend: ${ep === "webgpu" ? "WebGPU" : "WebAssembly (CPU)"}`;
63
+ const src = st.fromCacheMB > st.downloadMB * 0.99 ? "from browser cache" : "downloaded";
64
+ setProgress(0, "Ready", `${st.downloadMB.toFixed(0)} MB ${src} · ${(loadMs / 1000).toFixed(1)} s`);
65
+ window.__agate = { state: "ready", load: { ...st, loadMs, ep } };
66
+ ui.go.textContent = "Generate"; ui.go.disabled = false;
67
+ } catch (e) {
68
+ console.error(e);
69
+ setProgress(0, "Load failed", String(e.message || e));
70
+ window.__agate = { state: "error", error: String(e.message || e) };
71
+ ui.go.textContent = "Retry load"; ui.go.disabled = false; agate = null;
72
+ }
73
+ busy = false;
74
+ }
75
+
76
+ async function generate(opts = {}) {
77
+ busy = true; stop = false;
78
+ ui.go.textContent = "Stop"; ui.frame.classList.add("busy");
79
+ window.__agate.state = "generating";
80
+ const steps = opts.steps ?? Number(ui.steps.value);
81
+ try {
82
+ setProgress(0, "Encoding prompt", "");
83
+ const r = await agate.generate({
84
+ prompt: opts.prompt ?? ui.prompt.value.trim(), seed: Number(ui.seed.value) >>> 0, steps,
85
+ cfg: opts.cfg ?? Number(ui.cfg.value), noise: opts.noise ?? null,
86
+ onStep: (i, n) => setProgress(i / n, `Step ${i} / ${n}`, ""),
87
+ shouldStop: () => stop,
88
+ });
89
+ const ctx = ui.canvas.getContext("2d");
90
+ ui.canvas.width = r.width; ui.canvas.height = r.height;
91
+ ctx.putImageData(new ImageData(r.rgba, r.width, r.height), 0, 0);
92
+ ui.placeholder.hidden = true;
93
+ const T = r.timings;
94
+ setProgress(1, "Done", `${(T.totalMs / 1000).toFixed(1)} s`);
95
+ showTimings([
96
+ ["text encode", `${T.textMs.toFixed(0)} ms (bucket ${T.bucket})`],
97
+ ["per step", `${T.stepMs.toFixed(0)} ms × ${steps} (first ${T.firstStepMs.toFixed(0)} ms)`],
98
+ ["decode", `${T.decodeMs.toFixed(0)} ms`],
99
+ ["total", `${(T.totalMs / 1000).toFixed(2)} s`],
100
+ ]);
101
+ ui.save.href = ui.canvas.toDataURL("image/png"); ui.save.hidden = false;
102
+ window.__agate = { ...window.__agate, state: "done", timings: T };
103
+ return r;
104
+ } catch (e) {
105
+ if (String(e.message) === "stopped") setProgress(0, "Stopped", "");
106
+ else { console.error(e); setProgress(0, "Error", String(e.message || e)); window.__agate.error = String(e.message || e); }
107
+ window.__agate.state = "done";
108
+ } finally {
109
+ busy = false; ui.go.textContent = "Generate"; ui.frame.classList.remove("busy");
110
+ }
111
+ }
112
+
113
+ ui.go.onclick = async () => {
114
+ if (busy && agate?.sessions) { stop = true; return; }
115
+ if (busy) return;
116
+ if (!agate) return load();
117
+ return generate();
118
+ };
119
+ ui.prompt.addEventListener("keydown", (e) => { if (e.key === "Enter" && (e.ctrlKey || e.metaKey) && agate && !busy) generate(); });
120
+
121
+ // Parity self-test: index.html?parity=1 runs the fixture exported by export/parity_full.py
122
+ async function parity() {
123
+ const fx = await (await fetch("test/parity.json")).json();
124
+ const bin = async (f) => new Uint8Array(await (await fetch(`test/${f}`)).arrayBuffer());
125
+ const noise = new Float32Array((await bin("parity_noise.bin")).buffer);
126
+ const refZ = new Float32Array((await bin("parity_latent.bin")).buffer);
127
+ const refImg = await bin("parity_image.bin"); // HWC uint8
128
+ ui.prompt.value = fx.prompt; ui.steps.value = fx.steps; ui.cfg.value = fx.cfg;
129
+ const r = await generate({ prompt: fx.prompt, steps: fx.steps, cfg: fx.cfg, noise });
130
+ let dz = 0, dzs = 0, di = 0, dis = 0;
131
+ for (let k = 0; k < refZ.length; k++) { const d = Math.abs(r.latent[k] - refZ[k]); dz = Math.max(dz, d); dzs += d; }
132
+ for (let p = 0; p < refImg.length / 3; p++) for (let c = 0; c < 3; c++) {
133
+ const d = Math.abs(r.rgba[p * 4 + c] - refImg[p * 3 + c]); di = Math.max(di, d); dis += d;
134
+ }
135
+ const res = { latentMaxAbs: dz, latentMeanAbs: dzs / refZ.length, imageMaxAbs: di, imageMeanAbs: dis / refImg.length, ep, timings: r.timings };
136
+ const el = $("parity"); el.hidden = false;
137
+ el.innerHTML = `<span class="label"><i class="sq red"></i>Parity vs PyTorch pipeline (${ep})</span>
138
+ <p>final latent max |Δ| ${dz.toFixed(4)} (mean ${res.latentMeanAbs.toFixed(5)}) · image max |Δ| ${di}/255 (mean ${res.imageMeanAbs.toFixed(3)})</p>`;
139
+ window.__agate = { ...window.__agate, parity: res, state: "parity-done" };
140
+ }
141
+
142
+ (async () => {
143
+ if (!FORCE_EP) {
144
+ const s = await webgpuStatus();
145
+ if (!s.ok) {
146
+ ep = "wasm";
147
+ $("nogpu").hidden = false; $("nogpu-why").textContent = s.why;
148
+ ui.go.disabled = true; ui.go.textContent = "WebGPU required";
149
+ window.__agate = { state: "no-webgpu", why: s.why };
150
+ $("use-wasm").onclick = () => { $("nogpu").hidden = true; ui.go.textContent = "Load model (CPU)"; ui.go.disabled = false; };
151
+ return;
152
+ }
153
+ ui.backend.textContent = `backend: WebGPU${s.adapter ? " · " + s.adapter : ""}`;
154
+ }
155
+ ui.go.disabled = false;
156
+ ui.go.textContent = "Load model";
157
+ if (params.has("autoload") || PARITY || await hasCachedModel()) { // second visit: load straight from cache
158
+ await load();
159
+ if (PARITY && agate) await parity();
160
+ }
161
+ })();
162
+
163
+ window.agateClearCache = clearCache;
js/config.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ // Where the model files live. The Hugging Face Space hosts them next to the page in models/.
2
+ // A ?models=<url> query parameter overrides this.
3
+ window.AGATE_MODEL_BASE = "./models/";
models/generator.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f491fa95d2de2b37358171c5fbd3300c31d7b53d4c0e1870288f56cd3821a20d
3
+ size 385371629
models/manifest.json ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model": "Logolabs/agate-preview-001",
3
+ "format": "onnx opset 17; generator + text encoder: fp16 weights, fp32 compute; TAESD decoder: fp32",
4
+ "files": {
5
+ "generator.onnx": {
6
+ "bytes": 385371629,
7
+ "sha256": "f491fa95d2de2b37358171c5fbd3300c31d7b53d4c0e1870288f56cd3821a20d"
8
+ },
9
+ "text_encoder.onnx": {
10
+ "bytes": 136560058,
11
+ "sha256": "7288650624e42c84d96a389809daea8806ead8898215a94bf04dd51d1acbb314"
12
+ },
13
+ "taesd_decoder.onnx": {
14
+ "bytes": 4912775,
15
+ "sha256": "e98516c3f1f838bcd47ace5e6a184dbaa63ecc016a3406833779600cdbfb77a3"
16
+ },
17
+ "tokenizer.json": {
18
+ "bytes": 3583228,
19
+ "sha256": "6c8aaa9a542084f2457eab775d4eeb51f92a70c0fd9de28d5edb0ddec3c08d30"
20
+ },
21
+ "tokenizer_config.json": {
22
+ "bytes": 21785,
23
+ "sha256": "e7cb600a544347011cd31309043438c57b4fe30d53bbd18d1ad337a044a02bd3"
24
+ }
25
+ },
26
+ "text_max_len": 512,
27
+ "buckets": [
28
+ 64,
29
+ 128,
30
+ 256,
31
+ 512
32
+ ],
33
+ "latent_hw": 32,
34
+ "latent_ch": 4,
35
+ "ctx_dim": 512,
36
+ "sampler": {
37
+ "kind": "euler",
38
+ "steps": 50,
39
+ "cfg": 3.0,
40
+ "t0_is_noise": true,
41
+ "uncond_prompt": ""
42
+ },
43
+ "pad_token_id": 50283
44
+ }
models/taesd_decoder.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e98516c3f1f838bcd47ace5e6a184dbaa63ecc016a3406833779600cdbfb77a3
3
+ size 4912775
models/text_encoder.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7288650624e42c84d96a389809daea8806ead8898215a94bf04dd51d1acbb314
3
+ size 136560058
models/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
models/tokenizer_config.json ADDED
@@ -0,0 +1,945 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "|||IP_ADDRESS|||",
5
+ "lstrip": false,
6
+ "normalized": true,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": false
10
+ },
11
+ "1": {
12
+ "content": "<|padding|>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "50254": {
20
+ "content": " ",
21
+ "lstrip": false,
22
+ "normalized": true,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": false
26
+ },
27
+ "50255": {
28
+ "content": " ",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": false
34
+ },
35
+ "50256": {
36
+ "content": " ",
37
+ "lstrip": false,
38
+ "normalized": true,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": false
42
+ },
43
+ "50257": {
44
+ "content": " ",
45
+ "lstrip": false,
46
+ "normalized": true,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": false
50
+ },
51
+ "50258": {
52
+ "content": " ",
53
+ "lstrip": false,
54
+ "normalized": true,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": false
58
+ },
59
+ "50259": {
60
+ "content": " ",
61
+ "lstrip": false,
62
+ "normalized": true,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": false
66
+ },
67
+ "50260": {
68
+ "content": " ",
69
+ "lstrip": false,
70
+ "normalized": true,
71
+ "rstrip": false,
72
+ "single_word": false,
73
+ "special": false
74
+ },
75
+ "50261": {
76
+ "content": " ",
77
+ "lstrip": false,
78
+ "normalized": true,
79
+ "rstrip": false,
80
+ "single_word": false,
81
+ "special": false
82
+ },
83
+ "50262": {
84
+ "content": " ",
85
+ "lstrip": false,
86
+ "normalized": true,
87
+ "rstrip": false,
88
+ "single_word": false,
89
+ "special": false
90
+ },
91
+ "50263": {
92
+ "content": " ",
93
+ "lstrip": false,
94
+ "normalized": true,
95
+ "rstrip": false,
96
+ "single_word": false,
97
+ "special": false
98
+ },
99
+ "50264": {
100
+ "content": " ",
101
+ "lstrip": false,
102
+ "normalized": true,
103
+ "rstrip": false,
104
+ "single_word": false,
105
+ "special": false
106
+ },
107
+ "50265": {
108
+ "content": " ",
109
+ "lstrip": false,
110
+ "normalized": true,
111
+ "rstrip": false,
112
+ "single_word": false,
113
+ "special": false
114
+ },
115
+ "50266": {
116
+ "content": " ",
117
+ "lstrip": false,
118
+ "normalized": true,
119
+ "rstrip": false,
120
+ "single_word": false,
121
+ "special": false
122
+ },
123
+ "50267": {
124
+ "content": " ",
125
+ "lstrip": false,
126
+ "normalized": true,
127
+ "rstrip": false,
128
+ "single_word": false,
129
+ "special": false
130
+ },
131
+ "50268": {
132
+ "content": " ",
133
+ "lstrip": false,
134
+ "normalized": true,
135
+ "rstrip": false,
136
+ "single_word": false,
137
+ "special": false
138
+ },
139
+ "50269": {
140
+ "content": " ",
141
+ "lstrip": false,
142
+ "normalized": true,
143
+ "rstrip": false,
144
+ "single_word": false,
145
+ "special": false
146
+ },
147
+ "50270": {
148
+ "content": " ",
149
+ "lstrip": false,
150
+ "normalized": true,
151
+ "rstrip": false,
152
+ "single_word": false,
153
+ "special": false
154
+ },
155
+ "50271": {
156
+ "content": " ",
157
+ "lstrip": false,
158
+ "normalized": true,
159
+ "rstrip": false,
160
+ "single_word": false,
161
+ "special": false
162
+ },
163
+ "50272": {
164
+ "content": " ",
165
+ "lstrip": false,
166
+ "normalized": true,
167
+ "rstrip": false,
168
+ "single_word": false,
169
+ "special": false
170
+ },
171
+ "50273": {
172
+ "content": " ",
173
+ "lstrip": false,
174
+ "normalized": true,
175
+ "rstrip": false,
176
+ "single_word": false,
177
+ "special": false
178
+ },
179
+ "50274": {
180
+ "content": " ",
181
+ "lstrip": false,
182
+ "normalized": true,
183
+ "rstrip": false,
184
+ "single_word": false,
185
+ "special": false
186
+ },
187
+ "50275": {
188
+ "content": " ",
189
+ "lstrip": false,
190
+ "normalized": true,
191
+ "rstrip": false,
192
+ "single_word": false,
193
+ "special": false
194
+ },
195
+ "50276": {
196
+ "content": " ",
197
+ "lstrip": false,
198
+ "normalized": true,
199
+ "rstrip": false,
200
+ "single_word": false,
201
+ "special": false
202
+ },
203
+ "50277": {
204
+ "content": "|||EMAIL_ADDRESS|||",
205
+ "lstrip": false,
206
+ "normalized": true,
207
+ "rstrip": false,
208
+ "single_word": false,
209
+ "special": false
210
+ },
211
+ "50278": {
212
+ "content": "|||PHONE_NUMBER|||",
213
+ "lstrip": false,
214
+ "normalized": true,
215
+ "rstrip": false,
216
+ "single_word": false,
217
+ "special": false
218
+ },
219
+ "50279": {
220
+ "content": "<|endoftext|>",
221
+ "lstrip": false,
222
+ "normalized": false,
223
+ "rstrip": false,
224
+ "single_word": false,
225
+ "special": true
226
+ },
227
+ "50280": {
228
+ "content": "[UNK]",
229
+ "lstrip": false,
230
+ "normalized": false,
231
+ "rstrip": false,
232
+ "single_word": false,
233
+ "special": true
234
+ },
235
+ "50281": {
236
+ "content": "[CLS]",
237
+ "lstrip": false,
238
+ "normalized": false,
239
+ "rstrip": false,
240
+ "single_word": false,
241
+ "special": true
242
+ },
243
+ "50282": {
244
+ "content": "[SEP]",
245
+ "lstrip": false,
246
+ "normalized": false,
247
+ "rstrip": false,
248
+ "single_word": false,
249
+ "special": true
250
+ },
251
+ "50283": {
252
+ "content": "[PAD]",
253
+ "lstrip": false,
254
+ "normalized": false,
255
+ "rstrip": false,
256
+ "single_word": false,
257
+ "special": true
258
+ },
259
+ "50284": {
260
+ "content": "[MASK]",
261
+ "lstrip": true,
262
+ "normalized": false,
263
+ "rstrip": false,
264
+ "single_word": false,
265
+ "special": true
266
+ },
267
+ "50285": {
268
+ "content": "[unused0]",
269
+ "lstrip": false,
270
+ "normalized": true,
271
+ "rstrip": false,
272
+ "single_word": false,
273
+ "special": false
274
+ },
275
+ "50286": {
276
+ "content": "[unused1]",
277
+ "lstrip": false,
278
+ "normalized": true,
279
+ "rstrip": false,
280
+ "single_word": false,
281
+ "special": false
282
+ },
283
+ "50287": {
284
+ "content": "[unused2]",
285
+ "lstrip": false,
286
+ "normalized": true,
287
+ "rstrip": false,
288
+ "single_word": false,
289
+ "special": false
290
+ },
291
+ "50288": {
292
+ "content": "[unused3]",
293
+ "lstrip": false,
294
+ "normalized": true,
295
+ "rstrip": false,
296
+ "single_word": false,
297
+ "special": false
298
+ },
299
+ "50289": {
300
+ "content": "[unused4]",
301
+ "lstrip": false,
302
+ "normalized": true,
303
+ "rstrip": false,
304
+ "single_word": false,
305
+ "special": false
306
+ },
307
+ "50290": {
308
+ "content": "[unused5]",
309
+ "lstrip": false,
310
+ "normalized": true,
311
+ "rstrip": false,
312
+ "single_word": false,
313
+ "special": false
314
+ },
315
+ "50291": {
316
+ "content": "[unused6]",
317
+ "lstrip": false,
318
+ "normalized": true,
319
+ "rstrip": false,
320
+ "single_word": false,
321
+ "special": false
322
+ },
323
+ "50292": {
324
+ "content": "[unused7]",
325
+ "lstrip": false,
326
+ "normalized": true,
327
+ "rstrip": false,
328
+ "single_word": false,
329
+ "special": false
330
+ },
331
+ "50293": {
332
+ "content": "[unused8]",
333
+ "lstrip": false,
334
+ "normalized": true,
335
+ "rstrip": false,
336
+ "single_word": false,
337
+ "special": false
338
+ },
339
+ "50294": {
340
+ "content": "[unused9]",
341
+ "lstrip": false,
342
+ "normalized": true,
343
+ "rstrip": false,
344
+ "single_word": false,
345
+ "special": false
346
+ },
347
+ "50295": {
348
+ "content": "[unused10]",
349
+ "lstrip": false,
350
+ "normalized": true,
351
+ "rstrip": false,
352
+ "single_word": false,
353
+ "special": false
354
+ },
355
+ "50296": {
356
+ "content": "[unused11]",
357
+ "lstrip": false,
358
+ "normalized": true,
359
+ "rstrip": false,
360
+ "single_word": false,
361
+ "special": false
362
+ },
363
+ "50297": {
364
+ "content": "[unused12]",
365
+ "lstrip": false,
366
+ "normalized": true,
367
+ "rstrip": false,
368
+ "single_word": false,
369
+ "special": false
370
+ },
371
+ "50298": {
372
+ "content": "[unused13]",
373
+ "lstrip": false,
374
+ "normalized": true,
375
+ "rstrip": false,
376
+ "single_word": false,
377
+ "special": false
378
+ },
379
+ "50299": {
380
+ "content": "[unused14]",
381
+ "lstrip": false,
382
+ "normalized": true,
383
+ "rstrip": false,
384
+ "single_word": false,
385
+ "special": false
386
+ },
387
+ "50300": {
388
+ "content": "[unused15]",
389
+ "lstrip": false,
390
+ "normalized": true,
391
+ "rstrip": false,
392
+ "single_word": false,
393
+ "special": false
394
+ },
395
+ "50301": {
396
+ "content": "[unused16]",
397
+ "lstrip": false,
398
+ "normalized": true,
399
+ "rstrip": false,
400
+ "single_word": false,
401
+ "special": false
402
+ },
403
+ "50302": {
404
+ "content": "[unused17]",
405
+ "lstrip": false,
406
+ "normalized": true,
407
+ "rstrip": false,
408
+ "single_word": false,
409
+ "special": false
410
+ },
411
+ "50303": {
412
+ "content": "[unused18]",
413
+ "lstrip": false,
414
+ "normalized": true,
415
+ "rstrip": false,
416
+ "single_word": false,
417
+ "special": false
418
+ },
419
+ "50304": {
420
+ "content": "[unused19]",
421
+ "lstrip": false,
422
+ "normalized": true,
423
+ "rstrip": false,
424
+ "single_word": false,
425
+ "special": false
426
+ },
427
+ "50305": {
428
+ "content": "[unused20]",
429
+ "lstrip": false,
430
+ "normalized": true,
431
+ "rstrip": false,
432
+ "single_word": false,
433
+ "special": false
434
+ },
435
+ "50306": {
436
+ "content": "[unused21]",
437
+ "lstrip": false,
438
+ "normalized": true,
439
+ "rstrip": false,
440
+ "single_word": false,
441
+ "special": false
442
+ },
443
+ "50307": {
444
+ "content": "[unused22]",
445
+ "lstrip": false,
446
+ "normalized": true,
447
+ "rstrip": false,
448
+ "single_word": false,
449
+ "special": false
450
+ },
451
+ "50308": {
452
+ "content": "[unused23]",
453
+ "lstrip": false,
454
+ "normalized": true,
455
+ "rstrip": false,
456
+ "single_word": false,
457
+ "special": false
458
+ },
459
+ "50309": {
460
+ "content": "[unused24]",
461
+ "lstrip": false,
462
+ "normalized": true,
463
+ "rstrip": false,
464
+ "single_word": false,
465
+ "special": false
466
+ },
467
+ "50310": {
468
+ "content": "[unused25]",
469
+ "lstrip": false,
470
+ "normalized": true,
471
+ "rstrip": false,
472
+ "single_word": false,
473
+ "special": false
474
+ },
475
+ "50311": {
476
+ "content": "[unused26]",
477
+ "lstrip": false,
478
+ "normalized": true,
479
+ "rstrip": false,
480
+ "single_word": false,
481
+ "special": false
482
+ },
483
+ "50312": {
484
+ "content": "[unused27]",
485
+ "lstrip": false,
486
+ "normalized": true,
487
+ "rstrip": false,
488
+ "single_word": false,
489
+ "special": false
490
+ },
491
+ "50313": {
492
+ "content": "[unused28]",
493
+ "lstrip": false,
494
+ "normalized": true,
495
+ "rstrip": false,
496
+ "single_word": false,
497
+ "special": false
498
+ },
499
+ "50314": {
500
+ "content": "[unused29]",
501
+ "lstrip": false,
502
+ "normalized": true,
503
+ "rstrip": false,
504
+ "single_word": false,
505
+ "special": false
506
+ },
507
+ "50315": {
508
+ "content": "[unused30]",
509
+ "lstrip": false,
510
+ "normalized": true,
511
+ "rstrip": false,
512
+ "single_word": false,
513
+ "special": false
514
+ },
515
+ "50316": {
516
+ "content": "[unused31]",
517
+ "lstrip": false,
518
+ "normalized": true,
519
+ "rstrip": false,
520
+ "single_word": false,
521
+ "special": false
522
+ },
523
+ "50317": {
524
+ "content": "[unused32]",
525
+ "lstrip": false,
526
+ "normalized": true,
527
+ "rstrip": false,
528
+ "single_word": false,
529
+ "special": false
530
+ },
531
+ "50318": {
532
+ "content": "[unused33]",
533
+ "lstrip": false,
534
+ "normalized": true,
535
+ "rstrip": false,
536
+ "single_word": false,
537
+ "special": false
538
+ },
539
+ "50319": {
540
+ "content": "[unused34]",
541
+ "lstrip": false,
542
+ "normalized": true,
543
+ "rstrip": false,
544
+ "single_word": false,
545
+ "special": false
546
+ },
547
+ "50320": {
548
+ "content": "[unused35]",
549
+ "lstrip": false,
550
+ "normalized": true,
551
+ "rstrip": false,
552
+ "single_word": false,
553
+ "special": false
554
+ },
555
+ "50321": {
556
+ "content": "[unused36]",
557
+ "lstrip": false,
558
+ "normalized": true,
559
+ "rstrip": false,
560
+ "single_word": false,
561
+ "special": false
562
+ },
563
+ "50322": {
564
+ "content": "[unused37]",
565
+ "lstrip": false,
566
+ "normalized": true,
567
+ "rstrip": false,
568
+ "single_word": false,
569
+ "special": false
570
+ },
571
+ "50323": {
572
+ "content": "[unused38]",
573
+ "lstrip": false,
574
+ "normalized": true,
575
+ "rstrip": false,
576
+ "single_word": false,
577
+ "special": false
578
+ },
579
+ "50324": {
580
+ "content": "[unused39]",
581
+ "lstrip": false,
582
+ "normalized": true,
583
+ "rstrip": false,
584
+ "single_word": false,
585
+ "special": false
586
+ },
587
+ "50325": {
588
+ "content": "[unused40]",
589
+ "lstrip": false,
590
+ "normalized": true,
591
+ "rstrip": false,
592
+ "single_word": false,
593
+ "special": false
594
+ },
595
+ "50326": {
596
+ "content": "[unused41]",
597
+ "lstrip": false,
598
+ "normalized": true,
599
+ "rstrip": false,
600
+ "single_word": false,
601
+ "special": false
602
+ },
603
+ "50327": {
604
+ "content": "[unused42]",
605
+ "lstrip": false,
606
+ "normalized": true,
607
+ "rstrip": false,
608
+ "single_word": false,
609
+ "special": false
610
+ },
611
+ "50328": {
612
+ "content": "[unused43]",
613
+ "lstrip": false,
614
+ "normalized": true,
615
+ "rstrip": false,
616
+ "single_word": false,
617
+ "special": false
618
+ },
619
+ "50329": {
620
+ "content": "[unused44]",
621
+ "lstrip": false,
622
+ "normalized": true,
623
+ "rstrip": false,
624
+ "single_word": false,
625
+ "special": false
626
+ },
627
+ "50330": {
628
+ "content": "[unused45]",
629
+ "lstrip": false,
630
+ "normalized": true,
631
+ "rstrip": false,
632
+ "single_word": false,
633
+ "special": false
634
+ },
635
+ "50331": {
636
+ "content": "[unused46]",
637
+ "lstrip": false,
638
+ "normalized": true,
639
+ "rstrip": false,
640
+ "single_word": false,
641
+ "special": false
642
+ },
643
+ "50332": {
644
+ "content": "[unused47]",
645
+ "lstrip": false,
646
+ "normalized": true,
647
+ "rstrip": false,
648
+ "single_word": false,
649
+ "special": false
650
+ },
651
+ "50333": {
652
+ "content": "[unused48]",
653
+ "lstrip": false,
654
+ "normalized": true,
655
+ "rstrip": false,
656
+ "single_word": false,
657
+ "special": false
658
+ },
659
+ "50334": {
660
+ "content": "[unused49]",
661
+ "lstrip": false,
662
+ "normalized": true,
663
+ "rstrip": false,
664
+ "single_word": false,
665
+ "special": false
666
+ },
667
+ "50335": {
668
+ "content": "[unused50]",
669
+ "lstrip": false,
670
+ "normalized": true,
671
+ "rstrip": false,
672
+ "single_word": false,
673
+ "special": false
674
+ },
675
+ "50336": {
676
+ "content": "[unused51]",
677
+ "lstrip": false,
678
+ "normalized": true,
679
+ "rstrip": false,
680
+ "single_word": false,
681
+ "special": false
682
+ },
683
+ "50337": {
684
+ "content": "[unused52]",
685
+ "lstrip": false,
686
+ "normalized": true,
687
+ "rstrip": false,
688
+ "single_word": false,
689
+ "special": false
690
+ },
691
+ "50338": {
692
+ "content": "[unused53]",
693
+ "lstrip": false,
694
+ "normalized": true,
695
+ "rstrip": false,
696
+ "single_word": false,
697
+ "special": false
698
+ },
699
+ "50339": {
700
+ "content": "[unused54]",
701
+ "lstrip": false,
702
+ "normalized": true,
703
+ "rstrip": false,
704
+ "single_word": false,
705
+ "special": false
706
+ },
707
+ "50340": {
708
+ "content": "[unused55]",
709
+ "lstrip": false,
710
+ "normalized": true,
711
+ "rstrip": false,
712
+ "single_word": false,
713
+ "special": false
714
+ },
715
+ "50341": {
716
+ "content": "[unused56]",
717
+ "lstrip": false,
718
+ "normalized": true,
719
+ "rstrip": false,
720
+ "single_word": false,
721
+ "special": false
722
+ },
723
+ "50342": {
724
+ "content": "[unused57]",
725
+ "lstrip": false,
726
+ "normalized": true,
727
+ "rstrip": false,
728
+ "single_word": false,
729
+ "special": false
730
+ },
731
+ "50343": {
732
+ "content": "[unused58]",
733
+ "lstrip": false,
734
+ "normalized": true,
735
+ "rstrip": false,
736
+ "single_word": false,
737
+ "special": false
738
+ },
739
+ "50344": {
740
+ "content": "[unused59]",
741
+ "lstrip": false,
742
+ "normalized": true,
743
+ "rstrip": false,
744
+ "single_word": false,
745
+ "special": false
746
+ },
747
+ "50345": {
748
+ "content": "[unused60]",
749
+ "lstrip": false,
750
+ "normalized": true,
751
+ "rstrip": false,
752
+ "single_word": false,
753
+ "special": false
754
+ },
755
+ "50346": {
756
+ "content": "[unused61]",
757
+ "lstrip": false,
758
+ "normalized": true,
759
+ "rstrip": false,
760
+ "single_word": false,
761
+ "special": false
762
+ },
763
+ "50347": {
764
+ "content": "[unused62]",
765
+ "lstrip": false,
766
+ "normalized": true,
767
+ "rstrip": false,
768
+ "single_word": false,
769
+ "special": false
770
+ },
771
+ "50348": {
772
+ "content": "[unused63]",
773
+ "lstrip": false,
774
+ "normalized": true,
775
+ "rstrip": false,
776
+ "single_word": false,
777
+ "special": false
778
+ },
779
+ "50349": {
780
+ "content": "[unused64]",
781
+ "lstrip": false,
782
+ "normalized": true,
783
+ "rstrip": false,
784
+ "single_word": false,
785
+ "special": false
786
+ },
787
+ "50350": {
788
+ "content": "[unused65]",
789
+ "lstrip": false,
790
+ "normalized": true,
791
+ "rstrip": false,
792
+ "single_word": false,
793
+ "special": false
794
+ },
795
+ "50351": {
796
+ "content": "[unused66]",
797
+ "lstrip": false,
798
+ "normalized": true,
799
+ "rstrip": false,
800
+ "single_word": false,
801
+ "special": false
802
+ },
803
+ "50352": {
804
+ "content": "[unused67]",
805
+ "lstrip": false,
806
+ "normalized": true,
807
+ "rstrip": false,
808
+ "single_word": false,
809
+ "special": false
810
+ },
811
+ "50353": {
812
+ "content": "[unused68]",
813
+ "lstrip": false,
814
+ "normalized": true,
815
+ "rstrip": false,
816
+ "single_word": false,
817
+ "special": false
818
+ },
819
+ "50354": {
820
+ "content": "[unused69]",
821
+ "lstrip": false,
822
+ "normalized": true,
823
+ "rstrip": false,
824
+ "single_word": false,
825
+ "special": false
826
+ },
827
+ "50355": {
828
+ "content": "[unused70]",
829
+ "lstrip": false,
830
+ "normalized": true,
831
+ "rstrip": false,
832
+ "single_word": false,
833
+ "special": false
834
+ },
835
+ "50356": {
836
+ "content": "[unused71]",
837
+ "lstrip": false,
838
+ "normalized": true,
839
+ "rstrip": false,
840
+ "single_word": false,
841
+ "special": false
842
+ },
843
+ "50357": {
844
+ "content": "[unused72]",
845
+ "lstrip": false,
846
+ "normalized": true,
847
+ "rstrip": false,
848
+ "single_word": false,
849
+ "special": false
850
+ },
851
+ "50358": {
852
+ "content": "[unused73]",
853
+ "lstrip": false,
854
+ "normalized": true,
855
+ "rstrip": false,
856
+ "single_word": false,
857
+ "special": false
858
+ },
859
+ "50359": {
860
+ "content": "[unused74]",
861
+ "lstrip": false,
862
+ "normalized": true,
863
+ "rstrip": false,
864
+ "single_word": false,
865
+ "special": false
866
+ },
867
+ "50360": {
868
+ "content": "[unused75]",
869
+ "lstrip": false,
870
+ "normalized": true,
871
+ "rstrip": false,
872
+ "single_word": false,
873
+ "special": false
874
+ },
875
+ "50361": {
876
+ "content": "[unused76]",
877
+ "lstrip": false,
878
+ "normalized": true,
879
+ "rstrip": false,
880
+ "single_word": false,
881
+ "special": false
882
+ },
883
+ "50362": {
884
+ "content": "[unused77]",
885
+ "lstrip": false,
886
+ "normalized": true,
887
+ "rstrip": false,
888
+ "single_word": false,
889
+ "special": false
890
+ },
891
+ "50363": {
892
+ "content": "[unused78]",
893
+ "lstrip": false,
894
+ "normalized": true,
895
+ "rstrip": false,
896
+ "single_word": false,
897
+ "special": false
898
+ },
899
+ "50364": {
900
+ "content": "[unused79]",
901
+ "lstrip": false,
902
+ "normalized": true,
903
+ "rstrip": false,
904
+ "single_word": false,
905
+ "special": false
906
+ },
907
+ "50365": {
908
+ "content": "[unused80]",
909
+ "lstrip": false,
910
+ "normalized": true,
911
+ "rstrip": false,
912
+ "single_word": false,
913
+ "special": false
914
+ },
915
+ "50366": {
916
+ "content": "[unused81]",
917
+ "lstrip": false,
918
+ "normalized": true,
919
+ "rstrip": false,
920
+ "single_word": false,
921
+ "special": false
922
+ },
923
+ "50367": {
924
+ "content": "[unused82]",
925
+ "lstrip": false,
926
+ "normalized": true,
927
+ "rstrip": false,
928
+ "single_word": false,
929
+ "special": false
930
+ }
931
+ },
932
+ "clean_up_tokenization_spaces": true,
933
+ "cls_token": "[CLS]",
934
+ "extra_special_tokens": {},
935
+ "mask_token": "[MASK]",
936
+ "model_input_names": [
937
+ "input_ids",
938
+ "attention_mask"
939
+ ],
940
+ "model_max_length": 8192,
941
+ "pad_token": "[PAD]",
942
+ "sep_token": "[SEP]",
943
+ "tokenizer_class": "PreTrainedTokenizerFast",
944
+ "unk_token": "[UNK]"
945
+ }
test/parity.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "prompt": "a green teapot and a red cup on a table",
3
+ "steps": 50,
4
+ "cfg": 3.0,
5
+ "seed": 0,
6
+ "source": "release AgatePipeline, CPU fp32, fast_vae (TAESD), torch.randn replaced by parity_noise.bin",
7
+ "onnx_cpu_latent_max_abs": 0.0348610058426857,
8
+ "onnx_cpu_image_max_abs": 5
9
+ }
test/parity_image.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f02c5c097a4f5ba6bfc0738ef8b707c77b7ccffda50ebb349f408b16ee77d5e3
3
+ size 196608
test/parity_latent.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f33683243a20402962a1cb9a4f901bcb862aef2509a7a184e6eda637a234b91a
3
+ size 16384
test/parity_noise.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3deff7f51dd573fad149014c76a44c4b6f6251fbaaa9b8e78b794e805871773f
3
+ size 16384