Skip to content

QTS browser model manifest

Browser clients cannot rely on a single POSIX directory. Use a versioned manifest describing required blobs, optional URLs, and integrity metadata for caching.

JSON schema (informal)

Top-level object:

FieldTypeRequiredDescription
schema_versionintegeryesMust be 1 for this revision.
model_idstringyesHuman-readable id (e.g. Hugging Face repo name).
revisionstringyesOpaque version (commit, tag, or content hash prefix).
filesarrayyesList of file descriptors (see below).

Each element of files:

FieldTypeRequiredDescription
logical_namestringyesStable key used by the loader (main_gguf, vocoder_onnx, reference_codec_onnx, reference_codec_preprocess_json, tokenizer_config, …).
filenamestringyesBasename on disk / in cache (e.g. qwen3-tts-vocoder.onnx).
sha256stringnoHex digest for integrity after download.
size_bytesintegernoExpected size; helps resumable fetch UIs.
urlstringnoDirect download URL; omit if bytes come from elsewhere (OPFS upload).

Required logical names for full QTS

Align with native ModelPaths / export docs:

  • main_gguf — talker GGUF (any supported quantized name).
  • vocoder_onnxqwen3-tts-vocoder.onnx.
  • For ICL voice clone: reference_codec_onnx, reference_codec_preprocess_json (filename qwen3-tts-reference-codec-preprocess.json).

Tokenizer / config.json are typically embedded in GGUF for this stack; if split artifacts are added later, extend logical_name enums in xlai-qts-manifest (shared by xlai_qts_core::browser and xlai-wasm).

Caching recommendations

  1. Key cache entries by (model_id, revision, logical_name, sha256).
  2. If sha256 is missing, use revision + size_bytes only for best-effort invalidation.
  3. Prefer Cache Storage or OPFS for multi-hundred-MB GGUF; keep a small manifest in IndexedDB pointing to OPFS handles.

Rust types

See xlai_qts_manifest / xlai_qts_core::browser for serde-compatible structs and validate_required_files; the xlai-wasm crate (feature qts) depends on xlai-qts-manifest for the same types.

Released under the Apache License 2.0.