dsh-h3-image 0.2.11 → 0.2.13

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/lib/checks.js CHANGED
@@ -171,6 +171,14 @@ export function checkPlatform({ platform, arch }) {
171
171
  return { id: "platform", state: "ok", detail: "Apple Silicon macOS." };
172
172
  }
173
173
 
174
+ export function memoryGB(bytes) {
175
+ // GiB, not GB: Apple sells "32 GB" machines that report 34.4e9 bytes, and
176
+ // users match this number against the spec sheet on the box. Dividing by
177
+ // 1e9 showed a 32 GB Air as "34 GB" and confused its owner (found in the
178
+ // Air acceptance run, 0.2.13).
179
+ return bytes / 2 ** 30;
180
+ }
181
+
174
182
  export function checkMemory({ totalGB }) {
175
183
  if (totalGB < LIMITS.memoryFloorGB) {
176
184
  return {
@@ -378,7 +386,7 @@ export async function runStatus(config, deps = {}) {
378
386
  arch: deps.arch ?? process.arch,
379
387
  });
380
388
  const memory = checkMemory({
381
- totalGB: deps.totalGB ?? (deps.totalmem ?? totalmem)() / 1e9,
389
+ totalGB: deps.totalGB ?? memoryGB((deps.totalmem ?? totalmem)()),
382
390
  });
383
391
 
384
392
  const engineDirSt = await probeDir(resolved.engine_dir);
@@ -434,7 +442,12 @@ export async function runStatus(config, deps = {}) {
434
442
 
435
443
  export function overallOf(checks) {
436
444
  if (checks.some((c) => c.state === "refused")) return "unsupported";
437
- const bad = checks.filter((c) => c.state !== "ok");
445
+ // A warning-tier check (e.g. memory between the floor and the
446
+ // recommendation) is a caveat, not a blocker: the check line still shows
447
+ // its detail, but it must not hold the whole environment at
448
+ // setup_required forever — that used to lock h3_image on workable
449
+ // machines (found on a 34 GB Air, 0.2.11).
450
+ const bad = checks.filter((c) => c.state !== "ok" && c.warning !== true);
438
451
  if (bad.length === 0) return "ready";
439
452
  // "blocked" is reserved for a refused license (M2); until then anything
440
453
  // not-ready is setup work.
package/lib/setup.js CHANGED
@@ -47,6 +47,7 @@ import {
47
47
  probeGitHead,
48
48
  probeTextEncoderReuse,
49
49
  probeVenvPython,
50
+ memoryGB,
50
51
  runStatus,
51
52
  } from "./checks.js";
52
53
  import { findRunningJob, killJob, listJobs, newJobId, pollJob, submitJob } from "./jobs.js";
@@ -379,7 +380,7 @@ async function stepWeights(resolved, args, state, deps) {
379
380
  if (live) {
380
381
  return { ok: true, stage: "weights", state: "running", job_id: live.id, next: "poll", message: `Weights job ${live.id} is already running — attached instead of double-submitting.` };
381
382
  }
382
- const totalGB = (deps.totalmem ?? totalmem)() / 1e9;
383
+ const totalGB = memoryGB((deps.totalmem ?? totalmem)());
383
384
  const freeGB = await probeFreeGB(resolved.model_dir);
384
385
  const ditManifest = await probeFile(join(resolved.model_dir, "dit", "ASSET_SHA256.json"));
385
386
  const teMain = await probeFile(join(resolved.text_dir, "text_encoder.safetensors"));
package/locale/en.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "H3 Image (dsh-h3-image)",
4
- "description": "Unofficial third-party plugin, not affiliated with MiniMax. On Apple Silicon, fully local text-to-image with the open-source MiniMax H3-Image (MLX engine). A one-time setup wizard downloads a fixed version of the 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 network access. 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.11): read-only environment check, 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. On Apple Silicon, fully local text-to-image with the open-source MiniMax H3-Image (MLX engine). A one-time setup wizard downloads a fixed version of the 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 network access. 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.13): read-only environment check, 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 本地生图 (dsh-h3-image)",
4
- "description": "非官方第三方插件,与 MiniMax 无关联。在 Apple Silicon 上用开源 MiniMax H3-Image(MLX 引擎)做完全本地文生图。安装向导一次性把固定版本的引擎与权重下载到本机(下载前展示 MiniMax 社区许可及地域条款,由你本人确认接受);之后生图全程离线——不用密钥、不用账号、不联网。安装中的长步骤是后台任务,DSH 重启不丢、断点续传。需 Apple Silicon、48GB 及以上统一内存(32GB 不保证)、安装期约 60GB 可用磁盘;Intel Mac 与其他平台在检查阶段即明确拒绝。当前版本(0.2.11):只读环境体检 + 安装向导 + 本地产图(社区许可需你本人确认接受后才会出图)。"
4
+ "description": "非官方第三方插件,与 MiniMax 无关联。在 Apple Silicon 上用开源 MiniMax H3-Image(MLX 引擎)做完全本地文生图。安装向导一次性把固定版本的引擎与权重下载到本机(下载前展示 MiniMax 社区许可及地域条款,由你本人确认接受);之后生图全程离线——不用密钥、不用账号、不联网。安装中的长步骤是后台任务,DSH 重启不丢、断点续传。需 Apple Silicon、48GB 及以上统一内存(32GB 不保证)、安装期约 60GB 可用磁盘;Intel Mac 与其他平台在检查阶段即明确拒绝。当前版本(0.2.13):只读环境体检 + 安装向导 + 本地产图(社区许可需你本人确认接受后才会出图)。"
5
5
  }
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-h3-image",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
4
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 no network access at generation.",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",