dsh-h3-image 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -22,6 +22,9 @@ SOFTWARE.
22
22
 
23
23
  NOTE: This license covers the plugin source code only. The MiniMax H3-Image
24
24
  model weights are distributed separately by MiniMax under the MiniMax H3
25
- Image Community License Agreement (shown inside the setup wizard before any
26
- download), and the upstream MLX engine is Apache-2.0. See
25
+ Image Community License Agreement, and the quantized text encoder under the
26
+ MiniMax H3 Community License Agreement; the setup wizard shows the key
27
+ points of both (including territorial exclusions) with direct links to the
28
+ full texts before any download, and the original agreement files land on
29
+ your disk with the downloads. The upstream MLX engine is Apache-2.0. See
27
30
  THIRD_PARTY_NOTICES.md.
package/README.md CHANGED
@@ -1,21 +1,83 @@
1
1
  # dsh-h3-image
2
2
 
3
- **English** | [简体中文](README.zh.md)
3
+ [简体中文](#简体中文) | [English](#english)
4
4
 
5
- > **Name reserved.** This package version (0.2.0) ships the full local
6
- > pipeline: the read-only environment check, the one-time setup wizard
7
- > (venv → pinned engine clone → license gate → sha256-verified weight
8
- > download with resume → smoke test, each long step a background job that
9
- > survives restarts), and text-to-image. Nothing here calls any cloud
10
- > service.
5
+ ## 简体中文
11
6
 
12
- A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH)
13
- plugin bundle that runs the open-source **MiniMax H3-Image** text-to-image
14
- model **entirely on your own Apple Silicon Mac**, through the
15
- [MLX](https://github.com/ml-explore/mlx) engine. No API keys, no accounts, no
16
- per-image fees, no egress during generation.
7
+ > **非官方声明**:本插件是社区独立开发的第三方工具,与 MiniMax 无任何关联、未获其背书;"MiniMax-H3-Image" 仅用于指示所支持的模型。权重依 MiniMax 社区许可协议提供,**授权地域不含欧盟、英国、韩国、美国**——请自行确认你所在司法辖区可合法使用。完整免责与商用提示见 [docs/DISCLAIMER.md](docs/DISCLAIMER.md)。
17
8
 
18
- ## What you get
9
+ 一个 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)插件包:在**你自己的 Apple Silicon Mac** 上,通过 [MLX](https://github.com/ml-explore/mlx) 引擎运行开源的 **MiniMax H3-Image** 文生图模型,全程完全本地。零 API 密钥、零账号、零按张费用,生图过程零出网。
10
+
11
+ 当前版本交付完整本地链路:只读环境体检、一键安装向导(venv → 钉定引擎 clone → 许可确认 → sha256 校验的权重下载(支持断点续传)→ 冒烟出图,每个长步骤都是宿主重启不丢的后台任务),以及本地文生图。
12
+
13
+ ### 你能得到什么
14
+
15
+ | 工具 | 用途 |
16
+ | --- | --- |
17
+ | `h3_status` | 只读环境体检:平台、统一内存、venv、引擎 commit、权重、文本编码器、可用磁盘——每个红项附修复提示。 |
18
+ | `h3_setup` | 一键安装向导,可续传状态机:`check → venv → engine → license → weights → smoke`。长步骤(引擎安装、约 59 GB 下载+转换)以分离后台任务运行——提交秒级返回 `job_id`,`action=poll` 从引擎自身的磁盘状态读进度,中断的下载重跑时从 `.part` 续传。死掉的任务如实报 `interrupted`,绝不谎报"完成"。`action=license` 展示社区许可,接受记录只能由你本人产生;`action=reset` 清除本地状态记录。 |
19
+ | `h3_image` | 文生图:每次调用一个引擎子进程、内部 deadline、同一时刻只跑一路(第二路立即收到 `busy`)、PNG 结构校验通过才上报,产物落在你的会话工作区。 |
20
+
21
+ ### 运行要求
22
+
23
+ - Apple Silicon Mac(引擎仅支持 arm64;Intel/Windows/Linux 由 `h3_status` 明确拒绝,而不是崩溃)。
24
+ - **建议 48GB 及以上统一内存**;32GB 机型先警告再确认,低于 32GB 拒绝。
25
+ - 安装期约 60GB 可用磁盘(从零安装实测峰值;引擎删除源分片后稳态约 53GB——见下方资源账)。
26
+ - DSH ≥ 0.2.2-rc.1,Node ≥ 22.19。
27
+
28
+ ### 资源账(实测,裸机验收 2026-11-12/13)
29
+
30
+ 以下每个数字都来自 275GB Apple Silicon 机器上的一次从零验收运行(无复用候选、全新 venv/引擎/权重)——不是估算。
31
+
32
+ | 项目 | 实测 |
33
+ | --- | --- |
34
+ | 磁盘峰值(增量,全程) | 58.6 GB (54.6 GiB):DiT pack 21.5 + 文本编码器 28.2 + 在途源分片 5.4 + venv 1.1 |
35
+ | 磁盘稳态(安装完成后) | 53.2 GB(引擎转换后自删源分片) |
36
+ | venv 创建 | ~18 s(找到合适的独立 CPython 即复用,否则如实报 miss) |
37
+ | 引擎 clone + pip install | ~72 s |
38
+ | 权重:单个 transformer 分片(下载 5.5 GB + Q8 转换 + 删除) | ~4–5 分钟 |
39
+ | 权重:续传段(7 分片 + 28.2 GB 文本编码器) | 41 分钟 |
40
+ | 冒烟出图 | 30 s 墙钟 / 10.8 s 引擎时间(1 MP,6 步) |
41
+ | 生图内存峰值(引擎 metrics) | 27.5 GB / 张 @ 1 MP |
42
+ | 运行期间宿主已用内存 | 274 GB——含常驻推理服务;插件自身占用即上行的 27.5 GB |
43
+
44
+ 中断的步骤可续传:被杀的下载从 `.part` 继续(Range 请求),已完成分片绝不重下——验收运行的续传审计实证(已完成分片零重下)。
45
+
46
+ ### 许可——下载权重前必读
47
+
48
+ 本插件的**代码**是 MIT,不打包、不托管、不再分发模型——模型与其许可条款与本插件无关,插件只是带许可门的下载器与运行器。安装向导从 Hugging Face 官方仓库按钉定 revision 下载权重,并在拉取任何字节之前**展示两份协议的要点与全文直链**(权重:MiniMax H3 Image 社区许可;量化文本编码器:MiniMax H3 社区许可,均来自各自上游仓库),**点名地域排除(EU/UK/KR/US)**;协议原件随下载落盘在你的模型目录里。由你本人确认接受;插件永不代你接受。上游引擎为 Apache-2.0。详见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。
49
+
50
+ ### 安装(DSH)
51
+
52
+ 在 DSH 里用 `plugin_manager` 安装,两种来源任选:
53
+
54
+ ```
55
+ install_bundle → dsh-h3-image # 从 npm 装最新发布版
56
+ install_bundle → /path/to/dsh-h3-image # 或本地仓库/解包目录
57
+ ```
58
+
59
+ 然后在 profile 中启用该 bundle,跑一次 `h3_status`——机器还缺什么它会逐项告诉你。
60
+
61
+ ### 开发
62
+
63
+ ```sh
64
+ npm test # 单测(纯检查逻辑)
65
+ npm run release # 门禁 + pack + tarball 扫描
66
+ ```
67
+
68
+ 两道发布门禁在 CI 与 `prepack` 运行:`scripts/check-release-safety.mjs`(源码**与**产物 tarball 双扫:零机器指纹、零 AppleDouble、零密钥)与 `scripts/check-version-consistency.mjs`(package.json ↔ CHANGELOG ↔ locale ↔ 钉定 revision 四处一致)。
69
+
70
+ ---
71
+
72
+ ## English
73
+
74
+ > **Unofficial**: a third-party community tool, not affiliated with or endorsed by MiniMax; "MiniMax-H3-Image" is referenced descriptively only. Weights are provided under the MiniMax Community License, whose authorized territory **excludes the EU, UK, South Korea and the US** — verify you may lawfully use the model in your jurisdiction. Full disclaimer: [docs/DISCLAIMER.md](docs/DISCLAIMER.md).
75
+
76
+ A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) plugin bundle that runs the open-source **MiniMax H3-Image** text-to-image model **entirely on your own Apple Silicon Mac**, through the [MLX](https://github.com/ml-explore/mlx) engine. No API keys, no accounts, no per-image fees, no egress during generation.
77
+
78
+ The current version ships the full local pipeline: the read-only environment check, the one-time setup wizard (venv → pinned engine clone → license gate → sha256-verified weight download with resume → smoke test, each long step a background job that survives restarts), and text-to-image.
79
+
80
+ ### What you get
19
81
 
20
82
  | Tool | Purpose |
21
83
  | --- | --- |
@@ -23,22 +85,16 @@ per-image fees, no egress during generation.
23
85
  | `h3_setup` | The one-time setup wizard as a resumable state machine: `check → venv → engine → license → weights → smoke`. Long steps (engine install, ~59 GB of downloads + conversion) run as detached background jobs — submit returns a `job_id` in seconds, `action=poll` reads progress from the engine's own on-disk state, and an interrupted download resumes from `.part` on re-run. A dead job is reported `interrupted`, never "done". `action=license` shows the community license; acceptance is recorded only by you. `action=reset` clears the local state record. |
24
86
  | `h3_image` | Text-to-image: one engine subprocess per call, internal deadline, one generation at a time (a second call gets an immediate `busy`), PNG verified before it is reported, output lands in your session workspace. |
25
87
 
26
- ## Requirements
88
+ ### Requirements
27
89
 
28
- - Apple Silicon Mac (the engine is arm64-only; Intel/Windows/Linux are
29
- declined by `h3_status`, not by a crash).
30
- - **48 GB+ unified memory recommended**; 32 GB machines are warned-then-
31
- confirmed, below 32 GB is refused.
32
- - ~60 GB free disk during setup (measured peak on a from-zero install; the
33
- steady state after the engine deletes source shards is ~53 GB — see the
34
- resource ledger below).
90
+ - Apple Silicon Mac (the engine is arm64-only; Intel/Windows/Linux are declined by `h3_status`, not by a crash).
91
+ - **48 GB+ unified memory recommended**; 32 GB machines are warned-then-confirmed, below 32 GB is refused.
92
+ - ~60 GB free disk during setup (measured peak on a from-zero install; the steady state after the engine deletes source shards is ~53 GB — see the resource ledger below).
35
93
  - DSH ≥ 0.2.2-rc.1, Node ≥ 22.19.
36
94
 
37
- ## Resource ledger (measured, bare-metal acceptance 2026-11-12/13)
95
+ ### Resource ledger (measured, bare-metal acceptance 2026-11-12/13)
38
96
 
39
- Every number below comes from one from-zero acceptance run on a 275 GB
40
- Apple Silicon machine (no reuse candidates, fresh venv/engine/weights) —
41
- not from estimates.
97
+ Every number below comes from one from-zero acceptance run on a 275 GB Apple Silicon machine (no reuse candidates, fresh venv/engine/weights) — not from estimates.
42
98
 
43
99
  | Item | Measured |
44
100
  | --- | --- |
@@ -52,30 +108,24 @@ not from estimates.
52
108
  | Generation peak memory (engine metrics) | 27.5 GB per image at 1 MP |
53
109
  | Host memory in use during the run | 274 GB — includes a resident inference server; the plugin's own footprint is the 27.5 GB above |
54
110
 
55
- Interrupted steps resume: a killed download continues from its `.part`
56
- (Range requests), and finished shards are never re-fetched — verified by
57
- the acceptance run's resume audit (zero re-downloads of completed shards).
111
+ Interrupted steps resume: a killed download continues from its `.part` (Range requests), and finished shards are never re-fetched — verified by the acceptance run's resume audit (zero re-downloads of completed shards).
112
+
113
+ ### Licenses — read before downloading weights
58
114
 
59
- ## Licenses — read before downloading weights
115
+ This plugin's **code** is MIT. It does not ship, re-host or re-distribute the model — the model and its license terms have nothing to do with this plugin, which is only a downloader and runner with a license gate. Before any byte is fetched, the setup wizard **shows the key points of both agreements with direct links to their full texts** (weights: MiniMax H3 Image Community License; quantized text encoder: MiniMax H3 Community License, each from its own upstream repo) and **names the territorial exclusions (EU/UK/KR/US)**; the original agreement files land on your disk inside the model directory. You accept them yourself; the plugin never accepts on your behalf. The upstream engine is Apache-2.0. See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
60
116
 
61
- This plugin's **code** is MIT. It does not ship, re-host or re-distribute the
62
- model. The setup wizard downloads the weights from the official Hugging Face
63
- repository at a pinned revision, and **shows you the MiniMax H3 Image
64
- Community License Agreement — including its territorial exclusions — before
65
- any byte is fetched. You accept it yourself; the plugin never accepts on your
66
- behalf.** The upstream engine is Apache-2.0. See
67
- [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
117
+ ### Install (DSH)
68
118
 
69
- ## Install (DSH)
119
+ Install with `plugin_manager`, from either source:
70
120
 
71
121
  ```
72
- plugin_manager → install_bundle → <this repo or the npm package>
122
+ install_bundle → dsh-h3-image # latest release from npm
123
+ install_bundle → /path/to/dsh-h3-image # or a local checkout / unpacked dir
73
124
  ```
74
125
 
75
- Then enable the bundle in your profile and run `h3_status` — it tells you
76
- exactly what the machine still needs.
126
+ Then enable the bundle in your profile and run `h3_status` — it tells you exactly what the machine still needs.
77
127
 
78
- ## Development
128
+ ### Development
79
129
 
80
130
  ```sh
81
131
  npm test # unit tests (pure check logic)
@@ -12,21 +12,35 @@ machine, after the user accepts the respective license where required.
12
12
  - Pinned commit: recorded in `lib/pinned.js` (`ENGINE.commit`). The wizard
13
13
  clones and checks out exactly this commit; `main` is never followed.
14
14
 
15
- ## Model weights — `MiniMaxAI/MiniMax-H3-Image` (+ text encoder from `MiniMaxAI/MiniMax-H3`)
15
+ ## Model weights — `MiniMaxAI/MiniMax-H3-Image` (+ upstream meta from `MiniMaxAI/MiniMax-H3`)
16
16
 
17
17
  - Upstream: <https://huggingface.co/MiniMaxAI/MiniMax-H3-Image>
18
18
  - License: MiniMax H3 Image Community License Agreement (upstream `LICENSE`
19
- file). **The license includes territorial exclusions** — read the upstream
20
- LICENSE text yourself before downloading; the wizard shows it and requires
21
- your explicit acceptance. The plugin never accepts on your behalf.
19
+ file). **The license includes territorial exclusions (EU, UK, South Korea,
20
+ US)** — read the upstream LICENSE text yourself before downloading; the
21
+ wizard shows its key points with a direct link and requires your explicit
22
+ acceptance. The plugin never accepts on your behalf.
22
23
  - Pinned revisions: recorded in `lib/pinned.js` (`WEIGHTS.revision`,
23
24
  `TEXT_ENCODER.revision`); every downloaded file is verified against a
24
25
  recorded sha256.
25
26
 
27
+ ## Quantized text encoder — `ddalcu/MiniMax-H3-FL2VA-MLX-Serve-8bit`
28
+
29
+ - Upstream: <https://huggingface.co/ddalcu/MiniMax-H3-FL2VA-MLX-Serve-8bit>
30
+ - A community-quantized Model Derivative, hosted by an independent third
31
+ party; this plugin neither operates that repository nor is affiliated with
32
+ it. It is the package the pinned engine actually loads for the text path.
33
+ - License: **MiniMax H3 Community License Agreement** (a second agreement,
34
+ distinct from the H3-Image one, with the same territorial exclusions). Its
35
+ `LICENSE`, `NOTICE` and `MODIFICATIONS.md` are downloaded beside the
36
+ weights; the wizard lists both agreements before acceptance.
37
+ - Pinned revision + sha256: recorded in `lib/pinned.js`
38
+ (`TEXT_ENCODER_PACKAGE`).
39
+
26
40
  ## Runtime — Python ≥ 3.13 + MLX
27
41
 
28
42
  - The wizard creates an isolated virtual environment on your machine and
29
- installs the engine's declared dependencies (MLX is Apple-licensed, other
30
- packages under their own licenses). The plugin ships none of them.
43
+ installs the engine's declared dependencies (MLX is MIT-licensed by Apple,
44
+ other packages under their own licenses). The plugin ships none of them.
31
45
 
32
46
  No trademark or brand assets of MiniMax are included in this package.
package/lib/pinned.js CHANGED
@@ -52,6 +52,14 @@ export const TEXT_ENCODER = Object.freeze({
52
52
  export const TEXT_ENCODER_PACKAGE = Object.freeze({
53
53
  repo: "ddalcu/MiniMax-H3-FL2VA-MLX-Serve-8bit",
54
54
  revision: "64314cde0ac6d90f132bc94ae58e0c82f77396c6",
55
+ /**
56
+ * This quantized package is a Model Derivative of MiniMax-H3 (video) and
57
+ * carries its own agreement — the MiniMax H3 Community License, with the
58
+ * same territorial exclusions. It is a separate third-party repository;
59
+ * this plugin neither operates it nor accepts on anyone's behalf.
60
+ */
61
+ license: "MiniMax H3 Community License Agreement",
62
+ licenseSha256: "59b99642b95ea21630e311198ddbfffbfe05aadba0c2f5d884cbdf4efcc90f44",
55
63
  /** Only what the image path loads + the license trail. The engine's video
56
64
  * path needs more from this repo; H3 Image does not. */
57
65
  files: [
package/lib/state.js CHANGED
@@ -14,7 +14,7 @@
14
14
  import { rename, writeFile } from "node:fs/promises";
15
15
  import { join } from "node:path";
16
16
 
17
- import { WEIGHTS } from "./pinned.js";
17
+ import { TEXT_ENCODER_PACKAGE, WEIGHTS } from "./pinned.js";
18
18
  import { envelope } from "./checks.js";
19
19
 
20
20
  export const STATE_FILE_NAME = "h3-plugin-state.json";
@@ -43,14 +43,18 @@ export async function writeState(path, state, { writeFileP = writeFile, renameP
43
43
  /** Pure gate: returns null when generation may proceed, else the envelope. */
44
44
  export function licenseGate(state) {
45
45
  const rec = state?.license;
46
- if (rec?.accepted === true && rec?.agreement === WEIGHTS.license) {
46
+ const both = Array.isArray(rec?.agreements)
47
+ && rec.agreements.includes(WEIGHTS.license)
48
+ && rec.agreements.includes(TEXT_ENCODER_PACKAGE.license);
49
+ if (rec?.accepted === true && rec?.agreement === WEIGHTS.license && both) {
47
50
  return null;
48
51
  }
49
52
  return envelope(
50
53
  "license",
51
- `The model weights are distributed under the "${WEIGHTS.license}", which includes territorial ` +
52
- `exclusions and usage terms. No acceptance record exists for this model directory.`,
53
- `Read the agreement at the pinned Hugging Face model card, then record YOUR acceptance: ` +
54
+ `The model weights are distributed under the "${WEIGHTS.license}" and the quantized text ` +
55
+ `encoder under the "${TEXT_ENCODER_PACKAGE.license}", both with territorial exclusions and ` +
56
+ `usage terms. No acceptance record exists for both agreements on this model directory.`,
57
+ `Read both agreements at the pinned Hugging Face model cards, then record YOUR acceptance: ` +
54
58
  `h3_setup action=license accept=true. The plugin never accepts on your behalf.`,
55
59
  );
56
60
  }
@@ -58,17 +62,33 @@ export function licenseGate(state) {
58
62
  /** Summary shown by `h3_setup action=license` before acceptance (no I/O). */
59
63
  export function licenseSummary() {
60
64
  return [
61
- `Agreement: ${WEIGHTS.license}`,
62
- `Weights source: ${WEIGHTS.repo} @ ${WEIGHTS.revision.slice(0, 12)}`,
63
- "Key points (read the full text at the model card before accepting):",
64
- " - community license with TERRITORIAL EXCLUSIONS — check your region is permitted;",
65
- " - usage, redistribution and commercial terms are defined by the agreement, not by this plugin;",
66
- " - acceptance is recorded locally (timestamp + agreement name) and gates every download and generation;",
65
+ `Agreement 1: ${WEIGHTS.license}`,
66
+ ` Weights: ${WEIGHTS.repo} @ ${WEIGHTS.revision.slice(0, 12)}`,
67
+ ` Full text: https://huggingface.co/${WEIGHTS.repo}/raw/${WEIGHTS.revision}/LICENSE`,
68
+ `Agreement 2: ${TEXT_ENCODER_PACKAGE.license} (quantized text encoder, a separate third-party repo)`,
69
+ ` Package: ${TEXT_ENCODER_PACKAGE.repo} @ ${TEXT_ENCODER_PACKAGE.revision.slice(0, 12)}`,
70
+ ` Full text: https://huggingface.co/${TEXT_ENCODER_PACKAGE.repo}/raw/${TEXT_ENCODER_PACKAGE.revision}/LICENSE`,
71
+ "Key points shared by both agreements:",
72
+ " - TERRITORIAL EXCLUSIONS: authorized worldwide EXCEPT the EU, UK, South Korea and the US —",
73
+ " use outside the authorized territory is not licensed; confirm your jurisdiction first;",
74
+ " - commercial use above US$1M annualized revenue, or offering a hosted service, needs separate",
75
+ " written authorization from MiniMax; outputs may not train other models (see the AUP in the text);",
76
+ " - the original agreement files land on your disk with the downloads (LICENSE/NOTICE);",
77
+ " - usage, redistribution and commercial terms are defined by those agreements, not by this plugin;",
78
+ " - acceptance is recorded locally (timestamp + agreement names) and gates every download and generation;",
67
79
  " - this plugin never clicks accept for you: acceptance requires accept=true from you.",
68
80
  ].join("\n");
69
81
  }
70
82
 
71
83
  /** Pure transition: returns the new state with the acceptance record stamped. */
72
84
  export function acceptLicense(state, at = new Date().toISOString()) {
73
- return { ...state, license: { accepted: true, agreement: WEIGHTS.license, at } };
85
+ return {
86
+ ...state,
87
+ license: {
88
+ accepted: true,
89
+ agreement: WEIGHTS.license,
90
+ agreements: [WEIGHTS.license, TEXT_ENCODER_PACKAGE.license],
91
+ at,
92
+ },
93
+ };
74
94
  }
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "H3 Image (local MLX)",
4
- "description": "In Apple Silicon, fully local text-to-image with the open-source MiniMax H3-Image (MLX engine). A one-time setup wizard downloads the pinned engine and weights to your machine (the MiniMax community license and its region terms are shown before any download; you accept it yourself), then generation runs offline — no keys, no accounts, no egress. Long setup steps are background jobs that survive restarts and resume where they stopped. Requires Apple Silicon with 48 GB+ unified memory (32 GB is not guaranteed) and ~60 GB free disk during setup; Intel Macs and other platforms are declined up front. Current version (0.2.0): read-only environment check, one-click setup wizard, and local generation (the community license must be explicitly accepted by you before the first image)."
4
+ "description": "Unofficial third-party plugin, not affiliated with MiniMax. In Apple Silicon, fully local text-to-image with the open-source MiniMax H3-Image (MLX engine). A one-time setup wizard downloads the pinned engine and weights to your machine (the MiniMax community license and its region terms are shown before any download; you accept it yourself), then generation runs offline — no keys, no accounts, no egress. Long setup steps are background jobs that survive restarts and resume where they stopped. Requires Apple Silicon with 48 GB+ unified memory (32 GB is not guaranteed) and ~60 GB free disk during setup; Intel Macs and other platforms are declined up front. Current version (0.2.1): read-only environment check, one-click setup wizard, and local generation (the community license must be explicitly accepted by you before the first image)."
5
5
  }
6
6
  }
package/locale/zh.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "H3 本地生图(MLX)",
4
- "description": "在 Apple Silicon 上用开源 MiniMax H3-Image(MLX 引擎)做完全本地文生图。一键安装向导一次性把钉定版本的引擎与权重下载到本机(下载前展示 MiniMax 社区许可及地域条款,由你本人确认接受);之后生图全程离线——零密钥、零账号、零出网。安装中的长步骤是后台任务,宿主重启不丢、断点续传。需 Apple Silicon、48GB 及以上统一内存(32GB 不保证)、安装期约 60GB 可用磁盘;Intel Mac 与其他平台在检查阶段即明确拒绝。当前版本(0.2.0):只读环境体检 + 一键安装向导 + 本地产图(社区许可需你本人显式确认接受后才会出图)。"
4
+ "description": "非官方第三方插件,与 MiniMax 无关联。在 Apple Silicon 上用开源 MiniMax H3-Image(MLX 引擎)做完全本地文生图。一键安装向导一次性把钉定版本的引擎与权重下载到本机(下载前展示 MiniMax 社区许可及地域条款,由你本人确认接受);之后生图全程离线——零密钥、零账号、零出网。安装中的长步骤是后台任务,宿主重启不丢、断点续传。需 Apple Silicon、48GB 及以上统一内存(32GB 不保证)、安装期约 60GB 可用磁盘;Intel Mac 与其他平台在检查阶段即明确拒绝。当前版本(0.2.1):只读环境体检 + 一键安装向导 + 本地产图(社区许可需你本人显式确认接受后才会出图)。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-h3-image",
3
- "version": "0.2.0",
4
- "description": "Fully local text-to-image on Apple Silicon using the open-source MiniMax H3-Image model on MLX. A setup wizard builds the pinned engine and weights on your machine once; generation then runs offline with no keys and no cloud calls.",
3
+ "version": "0.2.1",
4
+ "description": "在 Apple Silicon 上用开源 MiniMax H3-Image(MLX 引擎)做完全本地文生图的 DeepSeek Harness 插件:一键安装向导 + 零出网本地生图。Fully local MiniMax H3-Image text-to-image on Apple Silicon MLX — a DeepSeek Harness plugin with a one-time setup wizard and zero-egress generation.",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
7
7
  "scripts": {
@@ -20,7 +20,6 @@
20
20
  "./LICENSE": "./LICENSE"
21
21
  },
22
22
  "files": [
23
- "README.zh.md",
24
23
  "lib",
25
24
  "assets",
26
25
  "cordis.patch.yml",
package/README.zh.md DELETED
@@ -1,80 +0,0 @@
1
- # dsh-h3-image
2
-
3
- [English](README.md) | **简体中文**
4
-
5
- > **名称已占位。** 当前版本(0.2.0)交付完整本地链路:只读环境体检、一键安装
6
- > 向导(venv → 钉定引擎 clone → 许可确认 → sha256 校验的权重下载(支持断点
7
- > 续传)→ 冒烟出图,每个长步骤都是重启不丢的后台任务),以及本地文生图。
8
- > 全程不调用任何云服务。
9
-
10
- 一个 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)
11
- 插件包,通过 [MLX](https://github.com/ml-explore/mlx) 引擎在你的 **Apple
12
- Silicon Mac 上完全本地**运行开源的 **MiniMax H3-Image** 文生图模型。
13
- 零 API 密钥、零账号、零按图计费,生图过程零出网。
14
-
15
- ## 提供什么
16
-
17
- | 工具 | 用途 |
18
- | --- | --- |
19
- | `h3_status` | 只读体检:平台、统一内存、venv、引擎 commit、权重、文本编码器、可用磁盘——每一项红灯都附修复提示。 |
20
- | `h3_setup` | 一次性安装向导,可续跑的状态机:`check → venv → engine → license → weights → smoke`。长步骤(引擎安装、约 59 GB 下载 + 转换)以脱离进程组的后台任务运行——提交秒级返回 `job_id`,`action=poll` 从引擎自己的磁盘状态读进度,中断的下载重跑即从 `.part` 续传。进程已死的任务如实报 `interrupted`,绝不谎报"完成"。`action=license` 展示社区许可,只有你本人确认才会记录接受。`action=reset` 清除本机状态记录。 |
21
- | `h3_image` | 文生图:每次调用一个引擎子进程,内置截止时间,同一时刻只跑一张(第二路立即收到 `busy`),PNG 结构校验通过才报成功,产物落在会话工作区。 |
22
-
23
- ## 环境要求
24
-
25
- - Apple Silicon Mac(引擎仅支持 arm64;Intel/Windows/Linux 在 `h3_status`
26
- 检查阶段即明确拒绝,而不是崩溃)。
27
- - **推荐 48 GB 及以上统一内存**;32 GB 机器先警告再确认,低于 32 GB 拒绝。
28
- - 安装期约 60 GB 可用磁盘(from-zero 安装的实测峰值;引擎删除源分片后的
29
- 稳态约 53 GB——见下方资源账表)。
30
- - DSH ≥ 0.2.2-rc.1,Node ≥ 22.19。
31
-
32
- ## 资源账(实测,裸机验收 2026-11-12/13)
33
-
34
- 下表每个数字都来自 275 GB Apple Silicon 机器上的一次 from-zero 验收运行
35
- (无复用候选、全新 venv/引擎/权重)——不是估算。
36
-
37
- | 项目 | 实测 |
38
- | --- | --- |
39
- | 磁盘峰值(增量,整个安装过程) | 58.6 GB(54.6 GiB):DiT 打包 21.5 + 文本编码器 28.2 + 在途源分片 5.4 + venv 1.1 |
40
- | 磁盘稳态(安装完成后) | 53.2 GB(源分片由引擎转换后自行删除) |
41
- | venv 创建 | 约 18 秒(能发现合适的独立 CPython 就复用,探测不到如实报 miss) |
42
- | 引擎 clone + pip 安装 | 约 72 秒 |
43
- | 权重:每个 transformer 分片(下载 5.5 GB + Q8 转换 + 删除) | 约 4–5 分钟 |
44
- | 权重:续传段(7 分片 + 28.2 GB 文本编码器) | 41 分钟 |
45
- | 冒烟出图 | 墙钟 30 秒 / 引擎耗时 10.8 秒(1 MP,6 步) |
46
- | 单图内存峰值(引擎 metrics) | 1 MP 每图 27.5 GB |
47
- | 运行期间主机已用内存 | 274 GB——含常驻推理服务;插件自身占用即上行 27.5 GB |
48
-
49
- 中断可续:被杀的下载从 `.part` 继续(Range 请求),已完成分片绝不重下——
50
- 验收运行的续传对账为证(零重下已完成分片)。
51
-
52
- ## 许可——下载权重前必读
53
-
54
- 本插件的**代码**是 MIT。**不打包、不转载、不分发模型。** 安装向导从官方
55
- Hugging Face 仓库按钉定 revision 下载权重,并且**在任何一个字节下载之前,
56
- 向你展示 MiniMax H3 Image 社区许可协议(含其地域排除条款)。由你本人接受;
57
- 插件永不代你接受。** 上游引擎为 Apache-2.0。见
58
- [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。
59
-
60
- ## 安装(DSH)
61
-
62
- ```
63
- plugin_manager → install_bundle → <本仓库或 npm 包>
64
- ```
65
-
66
- 然后在 profile 中启用该 bundle,跑一次 `h3_status`——机器还缺什么它逐项
67
- 告诉你。
68
-
69
- ## 开发
70
-
71
- ```sh
72
- npm test # 单元测试(纯检查逻辑)
73
- npm run release # 门禁 + 打包 + tarball 扫描
74
- ```
75
-
76
- 两道发布门禁在 CI 和 `prepack` 上运行:
77
- `scripts/check-release-safety.mjs`(零机器指纹、零 AppleDouble、零密钥——
78
- 源码**和**构建出的 tarball 都扫)与
79
- `scripts/check-version-consistency.mjs`(package.json ↔ CHANGELOG ↔ locale ↔
80
- 钉定 revision 一致性)。