Repository navigation
ComfyUI Base 3.22.1: triton beside the testbed's CPU torch on Linux - #43
Open
Soul-Craft wants to merge 2 commits into
Open
Soul-Craft wants to merge 2 commits into
Soul-Craft wants to merge 2 commits into
Conversation
The shared testbed's CPU torch (3.18.2) has no triton, which a pod's CUDA torch carries. ComfyUI-RMBG's HEAD (229529e) bundles a sam3 whose edt.py imports triton at module level, its loader's except branch then raises a NameError and the whole pack fails to register; ComfyUI-Easy-Sam3 stops on "No module named 'triton'". Found by image-creator-krea-2#10. testbed.sh --server on Linux now installs the newest triton right after torch, against a constraints file of the torch family as installed, so it never moves torch. A miss is a warning and the build goes on. --status names the venv's triton on Linux. macOS and the pod's install are unchanged. The requirements loop takes the bash 3.2 empty-array guard the rest of the file uses. A unit test holds the order, the constraints, the warning and the macOS path. Nothing ran on the Mac but bash -n, py_compile and package.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…port
A suite passes around a pack that never registered: image-creator-krea-2's
CI (run 39078526395) went green while ComfyUI-RMBG failed to import on the
testbed, and nothing in the log said so. testbed.sh --status now reads
ComfyUI's own "Import times for custom nodes" from this testbed's server
log and lists every pack marked "(IMPORT FAILED)", or "none", for every
package. A server this testbed did not start is never read.
A unit test covers a canned log with one failed pack and one clean one,
an all-clean log ("none"), and a foreign server. The 3.22.1 handbook
record says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Found 2026-10-17 by SoulCraft-Org/image-creator-krea-2#10. The shared CPU testbed (
testbed.sh --server) builds its venv with CPU torch on Linux (UV_TORCH_BACKEND=cpu, 3.18.2). CPU torch has no triton; a pod's CUDA torch carries it (lib/30-venv.shkeeps it in the torch family). Two packs import it at module level:models/sam3/model/edt.pydoesimport triton. RMBG's loader (__init__.py,load_nodes) prints{module_name}, an undefined name, in its except branch. So one failing file becomes a NameError and the whole pack fails to register.No module named 'triton'.Every package that uses RMBG sees a missing node on CI until the testbed has triton. Importing triton needs no GPU: Krea 2's
_build/prompt_check.pyinstalls it after CPU torch, and on the soulcraft-hf runner triton 3.8.0 imported and RMBG registered its 45 nodes.What
_testbed_tritonruns inprovision_serveron Linux, right after the CPU torch install:testbed/.testbed-torch.txtfromuv pip freeze(the torch family as installed).--upgrade) against that constraints file, so adding it never moves torch.import tritonand prints the version.--statusnames the venv's triton on Linux, or warns that there is none.--statusnames the packs its own server could not import, for every package: each pack ComfyUI's "Import times for custom nodes" marks(IMPORT FAILED)in this testbed's server log, or "none". A suite passes around a pack that never registered: Krea 2's CI run 39078526395 went green while RMBG failed to import, and nothing in the log said so. A server this testbed did not start is never read.${PACKS[@]+"${PACKS[@]}"}). Without it, a testbed with no packs died there underset -uon bash 3.2.macOS (no triton wheels) and the pod's install are unchanged. Both PyPI and the PyTorch CPU index carry triton 3.8.0 today, cp312 to cp315.
Tests
suite/test_unit.py::test_unit_testbed_puts_triton_beside_cpu_torch_on_linux(unit tier) runsprovision_serveragainst the suite's fake uv:--upgradeand a constraints file holding exactly torch, torchvision and torchaudio;test_unit_testbed_status_names_the_packs_its_server_could_not_import(unit tier) runsstatusagainst canned server logs: one failed pack and one clean one (only the failed one is named), an all-clean log ("none"), and a server this testbed did not start (nothing read).The fake uv gains
pip freezeand a$UV_NO_TRITONfailure; the existing testbed tests are unaffected.Nothing ran on the Mac except
bash -n,py_compileandpackage.py --base/--check(house rule: suites run in CI only).Exercised on
No host yet. The base's CI runs the unit test. After the tag, a package-ci run of image-creator-krea-2 provisions the testbed with this change and should show triton in the venv and RMBG absent from the
--statusimport report.🤖 Generated with Claude Code