Skip to content

Add a GB10-scoped MOSS runtime installer for ComfyUI - #2737

Merged
ashhart merged 5 commits into
mainfrom
comfyui-moss-runtime
Nov 21, 2026
Merged

ashhart merged 5 commits into
mainfrom
comfyui-moss-runtime

Conversation

@ashhart

@ashhart ashhart commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

What this changes

Add a standard-library installer for the offline ComfyUI MOSS sampler. It verifies the stable CLI release and pinned native source/compatibility patch, builds only moss-image-cuda, and activates a runtime after integrity and invocation checks. Failed setup preserves the active manifest; status is offline and CLI-only updates reuse the verified worker. A separate offline tool prepares fused BF16 checkpoint metadata without changing tensor payloads. Neither tool downloads model weights.

The first PR covers experimental BF16 generation on Linux aarch64 NVIDIA GB10, SM121. SM120 generation is unvalidated and outside this first PR's support scope. Existing worker compilation and device admission still include SM120/SM121. Linux x86_64 has software/build/install evidence only, with no SM120 workflow, numerical comparison or live kernel-contract execution.

  • Issue: Refs Agree the GB10 MOSS ComfyUI compatibility and runtime installer gate #2736. Native scope/gate agreement confirms the tooling and pinned build-copy boundary. The GB10 summary retains exact execution heads and limitations.
  • Related ComfyUI draft: Comfy-Org/ComfyUI#17653, scoped to BF16 generation on Linux aarch64 GB10/SM121.
  • Stacked on: main at 33ada77c3122fca844a6825316ce8bbabaca05be.
  • ATC_READ_ONLY=1 atc overlap --repo ashhart/TensorFold --base 33ada77c3122fca844a6825316ce8bbabaca05be --pulls 1665,2020,2095 --json: all three affected-file PRs inspected and clean, no limitations within that selected scope. A separate complete scan covered all 198 open PR file lists, including renames. Selected ATC coverage alone is not repository-wide clearance.

The gate is specific to source 1ddac962008367ec2c50e10202c910ecf430b5eb plus patch e6156ed11263a2d32586245b1702a6bc47ac0049e65bf1724afad69242eb617f: 13 registrations and 15 numerical controls. PR #2281's 24/21 encoder/decoder/served-image evidence is separate. This patch still edits the MOSS controls in zig/kernels/cuda/contract_controls.cu; any future source-pin upgrade after #2281 must rebase those hunks onto moss_controls.cuh and repeat qualification.

All source paths build an extracted copy. Even --source-checkout requires the exact clean pinned revision and archives tracked Git objects before extraction and patching; it never builds the working tree. The qualification uses the adapter's own case writer, SHA256 fb6b35b9ba0340b7e6dd4d83d36f4d845c925ce27aecd3ca76f77f34cf55f5c6, and parity harness c636317ca18e920ef97ae2a2af89ca9a197e8e1e38c7b8eb338645f95ba50228, as recorded in the executed reports. It does not use the current native moss_image_case.py tool. Neither the worker nor these results depend on the native served-image route.

Checks on this head

  • Head commit: 094fa078a2ec0388aa54302f3a095211bd468abd.
  • This head rebases the sealed candidate onto current main. The entire contribution patch is byte-identical to the sealed candidate. All installer, test, CI and native patch bytes remain unchanged; original GB10 receipts retain their execution heads. Current canonical native cache/build changes remain outside the independently pinned build-copy source.
  • Lean checker, python3 tools/zig/lean_check.py: current base and head each report 6155 files, 386 problems, exit 1 for inherited findings, zero new; complete checker output is identical. This checker does not qualify the external build-copy patch.
  • python -m unittest discover -s tools/comfyui_runtime/tests -v: 42 passed, zero failed or skipped; rerun locally after the current-base rebase. python -m pytest -q tests-unit/tensorfold qualification/test_moss_parity.py: 140 passed, zero failures, errors or skips on GB10 and CPU-only Linux x86_64.
  • Fresh standard GB10 installation, CLI/worker probes, offline status and no-op update passed. Actual x86_64 native build and a fresh offline install from verified official artifacts also passed. No prior runtime was reused in those recorded execution runs. GPU workflow and numerical evidence remain on the original execution bases; this pass did not rerun a GPU.
  • Native build-copy host command, zig build test test-kernel-contract test-golden fuzz-cortheon -j2 --summary all: 484/484 steps, 6248 tests passed, 29 skipped, zero failed, 55/55 server goldens equal. Plain build: 32/32 steps.
  • Fresh patch application, exact overlay/source comparisons, current ComfyUI Ruff rules, installer/qualification Ruff F/E9, Python 3.10 syntax and git diff --check passed. Native formatting and zero-new-Lean receipts are retained for unchanged native inputs.
  • CI: all nine non-nightly checks passed on this head, including the new installer job, root pytest, Linux/Windows host checks, macOS developer-tool build, client tests, release paths and format. The two nightly-only jobs were skipped for this pull request. CI run.
  • Not run: SM120 live GPU checks and other GPU/backend platforms. They are not qualified by SM121 or CPU results. SM120 is deferred outside first-PR generation support.

Receipt

  • Main against branch: canonical native sources on companion main and branch are unchanged. The separately applied build-copy patch changes native materialization, reduction and cuBLASLt planning to match ComfyUI's BF16 reference. Three fixed full trajectories have byte-identical latents and zero decoded pixel differences; all input hashes and original limits were retained. The approved public GB10 summary records the measured cases; paired detailed receipts and cold timings remain in the local review package. No general throughput claim is made.
  • Boxes it reaches: generation validated on Linux aarch64 NVIDIA GB10 SM121 only, with approximately 128 GB unified memory. Linux x86_64 CPU software/build/install evidence is supplementary. No smaller-memory GPU or SM120 generation result is claimed.
  • New switch: n/a, no new native runtime setting or model execution mode. Existing build/device admission includes SM120/SM121, while this PR's generation support scope is GB10/SM121.
  • Environment: companion base/head above; native source 1ddac962008367ec2c50e10202c910ecf430b5eb plus patch SHA256 e6156ed11263a2d32586245b1702a6bc47ac0049e65bf1724afad69242eb617f; Zig 0.17.0, CUDA 13.0.88, driver 580.178.04, PyTorch 2.14.1+cu130. Official Comfy-Org/MOSS-Image revision 2929efe3cdd506c0a430bcfca70a9a8d805cc095, BF16 Base transformer, Qwen3.5 encoder and Flux2 VAE. Complete model file hashes remain in the local review package; the selected public summary identifies its immutable model revision.
  • Paths and platforms: fresh install, update, offline status, checkpoint preparation and complete ComfyUI encoder/sampler/VAE/save/receipt workflow passed on GB10. Runtime/checksum errors, recovery, active-worker cancellation and temporary/worker cleanup passed. Windows/macOS media installation is refused; other execution platforms are unrun.
  • Exactness: n/a for token hashes, drafted decode, resumed chat and concurrent token streams; this worker is single-image diffusion. Latents and decoded pixels are identical for 256x256/3 steps/seed 0, 1024x1024/50 steps/seed 42 and 768x512/10 steps/seed 23 with long conditioning. Two teacher-forced steps have zero velocity error and identical repeats.
  • Main against this branch before requesting a machine run: canonical inference is unchanged; the native patch and ComfyUI reference comparisons above are the applicable image evidence. No outside machine run is being requested by this local draft.
  • Decode speed: n/a for token decode. VAE pixel equality and per-case timings are retained; this PR makes no image throughput claim.
  • Prompt speed: n/a for chat TTFT. The existing ComfyUI encoder is retained and the full workflow measures it separately.
  • Licence of new weights or drafter: n/a, no weights or drafter are added; existing model licences remain applicable.
Kernel contract for the build-copy compatibility patch
  • Registrations cover the complete MOSS set and touched legacy vision entry: plain/modulated norm, both QKV and SiTU layouts, residual FMA, MOSS attention, preserved legacy attention, bias, SiLU, modulation and timestep generation. The MOSS-specific attention entry preserves the existing vision entry. The selected public GB10 summary includes the exact pinned source/patch and complete summary lines; detailed registration/resource receipts remain local.
  • All 15 planted numerical faults and 12 compile/live invalid-launch checks fail as planted. Independent FP64 references, nonfinite inputs, guarded buffers, aliases, served/tail shapes and repeat checks are retained. No acceptance limit was loosened.
  • CUDA summary, exit 0:
SUMMARY moss image: 13 kernels, 13 pass gates 1-4, 0 fail; 15 controls: 15 red as planted, 0 missed
SUMMARY moss limits: 10 launches, 12 compile/live controls red, 0 problems
  • Compiled resource checks cover SM80/86/89/120/121. Live numerical and launch checks cover SM121 only. SM120 and all other live chips/backends are unrun. Direct old/new legacy attention comparison on SM121 passed 96 cases and 960 launches with bit-identical output and intact inputs/guards.

Checklist

  • Title and description match the final local head, receipt and stack.
  • Installer failure/tampering/cleanup tests and native planted fault controls have recorded failing and passing outcomes; no new test was added for the support-scope documentation and unrelated upstream rebase.
  • Comments/docstrings and source layout have zero new Lean findings. Measurements remain in receipts and documentation.
  • Complete package, hidden tracked files and new outgoing commit identity/history were inspected for private data, credentials, local paths and AI attribution.
  • No precision concession is claimed; the rounding changes and exact image comparisons are documented.
  • Native scope/gate agreement and issue/coordination clearance. Current base and overlap checks pass.
  • Public CI passed and the immutable companion installation reference is accessible and verified.

Token lane, draft/resume/concurrency and token throughput checklist items are n/a for the single-image diffusion worker. SM120 qualification is deferred from this first PR, not passed.

@ashhart

ashhart commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

/atc exchange 14a5b3c7773c1d8eaf5e52a9c939b36521983da9580d3713747299693b2b3992

@ashhart

ashhart commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Status on this head (44594b8fb7), following the update on #2736:

  • Any GPU but GB10 (sm_121) is refused at install, update and run (tools/comfyui_runtime/tf_installer/device.py:26). A compute capability that can't be read is refused too.
  • The worker is built for sm_121 alone (tools/comfyui_runtime/tf_installer/build.py:122).
  • The installer suite has 48 tests and they pass. CI is green on this head, and it merges cleanly with today's main.

Two parts of the description are out of date: its head and its count of 42 tests, and the line saying worker compilation and device admission still include SM120. Both get updated when the PR leaves draft.

One thing is left before then: a fresh-install smoke run on a GB10, to show the sm_121 path still installs and generates with the narrowed build. Separately, the ComfyUI-side draft should also admit only 12.1, or start the worker through the new run entry.

  • Synthena (Ash's Agent)

@ashhart
ashhart force-pushed the comfyui-moss-runtime branch from 44594b8 to 0136207 Compare November 14, 2026 03:24
@ashhart
ashhart marked this pull request as ready for review November 14, 2026 09:13
@ashhart
ashhart force-pushed the comfyui-moss-runtime branch 2 times, most recently from 321ae58 to dd9fe72 Compare November 19, 2026 04:30
@ashhart
ashhart force-pushed the comfyui-moss-runtime branch from dd9fe72 to 8f8d7e7 Compare November 21, 2026 06:14
ashhart added a commit that referenced this pull request Nov 21, 2026
The first MOSS ComfyUI PR is qualified on GB10 alone (#2736), but an
SM120 card would install and generate unchecked. Now install and update
read every GPU's compute capability from nvidia-smi before any download
or build, and the new `run` entry reads it again before the worker
starts; anything but 12.1 is refused by name ("MOSS ComfyUI generation
is qualified on GB10 (sm_121) only; this GPU is sm_120"), and a
capability that cannot be read is refused, never assumed.

The worker built here has no other consumer, so it is compiled for
sm_121 alone (-Dsm=121): with no sm_120 image or PTX, its kernels
cannot load on an SM120 GPU even when it is started directly.
@ashhart
ashhart force-pushed the comfyui-moss-runtime branch from 8f8d7e7 to 800e55c Compare November 21, 2026 07:12
@ashhart
ashhart merged commit 9b89bd9 into main Nov 21, 2026
2 of 11 checks passed
ashhart added a commit that referenced this pull request Nov 21, 2026
@ashhart
ashhart deleted the comfyui-moss-runtime branch November 21, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant