// Minimal browser inference for Bartholomheow/Supra2-IMG-ONNX — no build step. // Serve this folder over http(s) and open index.html (modules + WebGPU need secure context). // // Needs the onnxruntime-web UMD global (plain // // Transformers.js ships as ESM only (no UMD global exists), so it is imported // below from the CDN by full URL. In a bundler (vite/webpack) both libraries // resolve through ESM imports instead: // npm i onnxruntime-web @huggingface/transformers const REPO = 'Bartholomheow/Supra2-IMG-ONNX'; export const EXAMPLE_BUILD = '2026-09-25e-fp32only'; const TRANSFORMERS_CDN_URL = 'https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.8.1/dist/transformers.min.js'; const fileUrl = (repo, path) => `https://huggingface.co/${repo}/resolve/main/${path}`; // ESM import when bundled; UMD global (ort) or full-URL ESM import // (transformers.js, which has no UMD build) when loaded via