跳转至

您自己的语音模型

Hex 可以运行不在其目录中的 GGUF 语音模型:您通过“添加模型文件…”添加的文件,或另一个应用已下载到 Hugging Face 缓存的文件。这两者在每个操作系统上都是普通功能(它们作为 custom-models 离开了 Labs;hex labs on|off custom-models 仍然会响应并如此说明)。目录模型仍是经过测试的路径:Hex 不会为它未固定的文件提供任何担保。

添加模型文件

Picker header -> "Add model file…" -> native dialog (GGUF, All files)   // setup.custom-models
├── Header check, before anything loads (transcription::gguf_header): GGUF v2/v3;
│   general.architecture parakeet | whisper | qwen3_asr | cohere_asr | sensevoice |
│   gigaam (any other, e.g. llama.cpp's or SenseVoice.cpp's `sensevoice-small`,
│   says the file was made for another program and needs a transcribe.cpp
│   conversion, or the catalog's download; #1299);
│   stt.variant; general.languages with a code Hex knows; only F32, F16, and
│   Q8_0 tensors (the types every build runs on Metal and Vulkan); the tensor
│   data fits the file. Anything else -> "<file> can't be imported: <reason>"
├── Copy -> models/custom/<16 hex>.gguf while hashing; the copy is checked again;
│   receipt <16 hex>.gguf.verified.json (size, SHA-256, mtime, inode where
│   the OS reports one, never the volume's device number, which macOS can
│   renumber at a restart; older receipts' file_id is ignored); manifest <16 hex>.json (name, general.name, family,
│   variant, languages, detection, file name, licence, repo URL). The original
│   is never touched; a failed or cancelled import removes only its partial
│   copy; the same file again keeps the first import
├── ID custom-<first 16 hex of the SHA-256> (TranscriptionModelId::Custom)
├── Card -> name from general.name (Rename edits it), languages from the file,
│   offline only (no streaming), Parakeet without language prompt or Auto,
│   no benchmark; Use prepares it like a catalog model (verifies Hex's copy
│   against its receipt instead of downloading). General's Language menu
│   lists every language the file declares: Hex's usual list first, then the
│   rest of Whisper's codes by English name (Norwegian `no`, Norwegian
│   Nynorsk `nn`, …; #1148)
├── Remove -> Hex's copy, receipt, and manifest only; not the active model
├── Changed (a copy replaced by a link or hard link to the same file reads as
│   changed: its file ID and mtime moved) -> "Check again" rehashes the file:
│   the recorded SHA-256 again -> new receipt, ready; else it stays changed.
│   Missing or changed -> "Import again…": the same file replaces the copy and
│   keeps the import's name
├── The selected import missing or changed -> its card is not In use and
│   shows only Check again / Import again… (no Rename or Remove); a check or
│   import that succeeds asks for it again (ChooseModel), so the listener
│   leaves the fallback for it
└── Saved import missing or changed (size, mtime, or file ID) -> the choice
    stays saved; the listener runs a downloaded fallback (the system language's
    recommendation if downloaded, else the first downloaded catalog model;
    custom_models::runnable); General's model row names the fallback and says
    to check it again in the picker (not "can't listen until downloaded",
    while the fallback is downloaded); the card warns

启用 Labs › Model in use first 后,如果选择器打开时有导入正在使用,则会进入“所有模型”,并且“您的模型文件”会显示在该语言分组上方([labs.md](labs.md))。

原地使用模型文件(Labs)

Labs › Use model files where they are on (labs.model_in_place, off by default)  // labs.model-in-place
Picker header -> "Use model file where it is…" beside "Add model file…" -> the same dialog
├── Gate: the button shows only while the toggle is on, and the add starts only
│   if it is still on when the dialog answers (model_import::in_place_on)
├── custom_models::add_in_place on a worker: the import's header check, one full
│   SHA-256, receipt and manifest (with the file's path, no Hugging Face origin)
│   in models/custom/; nothing copied, nothing written near the file
├── The same file imported by copy before -> same ID, keeps its name; Hex's
│   copy is removed
├── Card -> "Used where it is" · family · languages · the file's name; Use
│   loads it from its path; later uses rehash only when size, mtime, or file ID
│   change, and Check again accepts it when the contents still match
├── Another account changes or removes the file -> Changed or Missing, as above
└── Forget -> Hex's receipt and record only; the file stays

关闭时,选择器没有此类按钮,Hex 会像以前一样复制每个添加的文件。共享文件夹以及来自共享文件夹的目录模型不会被构建。

本地摘要标识 Hex 复制的文件;它不是发布者校验和。选择、最近使用的模型和键盘语言映射会在导入无法运行时保留该导入(models::validate_saved),而不认识 custom-… 的构建会保留该字段的默认值,且不会重写 settings.json(#744)。hex model import <path> [--name N]、hex model rename <id> <name>、hex model repair <id> 和 hex model remove <id>(以及 hex models …)在 CLI 进程中运行;正在运行的 Hex 会立即列出更改(注册表会在 models/custom/ 文件夹变化时重新读取它)。

在此电脑上找到

Picker opens, or onboarding starts -> one scan (found_models::scan)   // setup.found-models
├── Where: $HF_HUB_CACHE, else $HF_HOME/hub, else ~/.cache/huggingface/hub
│   (Windows %USERPROFILE%\.cache\huggingface\hub); models--*/snapshots/*/*.gguf
├── Cheap: headers only, through the import's checks; each file's result is kept
│   by path, size, mtime, and file ID, so an unchanged file is never read twice.
│   Never in the background, never a full hash during the scan
├── Exact catalog match: the snapshot links to blobs/<sha256> and that digest and
│   size are a catalog pin (a plain copy: repository, file name, and size)
│   -> that catalog model counts as downloaded; its card says "Found on this
│   computer" and offers Use, never Download
├── Other compatible files -> "Found on this computer" at the top of the picker:
│   name · Not tested by Hex · Q8_0/F16/F32 · owner/name@revision · languages,
│   "It may be too big for this computer's GPU memory." when the tensor data
│   plus a quarter exceeds the largest GPU transcribe.cpp reports, and
│   "Compatible doesn't mean accurate: …"
├── Use -> full SHA-256 once (a catalog file against its pin; another file against
│   its blob name), then prepared like any model. Receipts live with Hex:
│   models/found/<model>.json for a catalog file, models/custom/ for another;
│   later uses rehash only when size, mtime, or file ID change
├── A failed check or load -> "Model could not be used." with the reason; the
│   selection and any recorded audio stay as they were
└── Delete/Remove on a found file -> Forget: Hex's record goes, the file stays.
    Hex never writes, moves, or deletes inside the cache. A forgotten catalog
    file is noted in models/found/<model>.forgotten.json, so later scans no
    longer count it as downloaded and its row offers Download (#1366)

hex model list 也会扫描,并显示每个模型的来源:download、hex、imported 或 found: owner/name@abcdef1;尚未使用的兼容文件会被列为 custom-<first 16 hex of its blob>,并带有 (not tested by Hex),而 hex model use <that id> 会完整检查它并在原位置使用它。本地 API 的 /models 与 SDK 的 ModelInfo.source 携带同一字段。

引导选择

Onboarding opens -> scan; its own download waits until it answers  // setup.found-choice
├── Nothing compatible found -> Setting up Hex, unchanged: the recommended
│   model downloads by itself, and the model step never shows
└── Something found -> the first run's model step in place of Setting up Hex:
    "Choose a speech model", one card of radio rows, no buttons inside
    ├── Hex's recommended model first, selected, [Recommended] -> "731 MB
    │   download", or "On this computer" when its exact file (same SHA-256) is
    │   in the cache (one row, never two)
    ├── Then each found file -> its name, "On this computer" (a catalog model)
    │   or "On this computer · not tested by Hex"; no hashes, repositories,
    │   revisions, or compression
    ├── Picking a row starts it: ours downloads ("Downloading… 42%" on the row)
    │   or, already here, is checked in place; a found file is used where it
    │   is ("Checking…"). A later pick supersedes one still preparing
    ├── Continue starts the selected row if none was picked, then the story
    │   moves on once the pick is under way: ours with its download pill on
    │   top, a found one with no download page or pill at all
    ├── A pick that fails asks again on the list
    ├── Back on the pages after it returns to the list to change the pick,
    │   even with the model ready
    └── The held download is released once the tour passes setup, so a run
        that skips the step still gets the recommended model

在 apollo 上观察到(Linux,Radeon 8060S 配合 Vulkan,2026-11-01),使用隔离的数据文件夹和一个模拟 hub,其中包含 Parakeet v3 的固定 blob 与 Parakeet primeLine Q8_0(handy-computer/parakeet-primeline-gguf@cf04224):hex model list 将 v3 显示为 found: …@85ac09e,将 primeLine 显示为 custom-dbd1ec2985aea64d (not tested by Hex);hex model use 在原位置加载了二者,hex model transcribe 用二者都完成了转写,hex model remove 移除了 primeLine,而缓存中的文件、大小和时间均未改变。引导和选择器场景都是根据这次真实扫描渲染的。此前,通过复制导入的同一个 primeLine 文件转写了 FLEURS 的德语和英语样本。未观察到的情况:macOS(Metal)和 Windows 完全没有;不含符号链接的纯复制缓存;以及小 GPU 上的 GPU 内存警告。

检查项:transcription::found_models::tests(扫描、缓存、目录匹配、原位使用与遗忘、被遗忘的目录文件不再计为已下载、完整检查拒绝不匹配的文件),transcription::gguf_header::tests,transcription::custom_models::tests(包括 a_relinked_copy_reads_as_changed_and_check_again_accepts_only_the_same_contents、a_receipt_survives_a_renumbered_volume_but_not_another_file 和 a_file_added_in_place_is_recorded_by_path_copied_nowhere_and_forgetting_leaves_it),desktop::onboarding::tests::a_held_download_waits_for_the_person、a_found_model_moves_on_without_a_download_and_back_returns_to_it、the_onboarding_model_list_starts_the_row_picked_or_the_recommended_one、labs::tests::graduated_features_answer_by_name,以及 golden 文件 rune-picker-custom-models-light、rune-picker-found-light、rune-onboarding-model-found-light、rune-onboarding-model-found-downloading-light、rune-onboarding-model-found-recommended-light 和 rune-onboarding-model-found-back-light。

本页原文 Markdown:在 AtomGit 查看·内容源自开源项目 hex19/hex