Move web/ to javascript/ and declare it via [tool.comfy] web.
Rename the seven third-party bundles (playcanvas, spark, three.js, gsplat,
OrbitControls, TrackballControls) to .mjs. Every reference to them is inside the
HTML viewers, but ComfyUI auto-imports **/*.js under the web dir into the shared
browser realm, so ~8MB of vendor code was being evaluated in the main page on
every startup -- and with it 36 collision errors: document.body injection,
document-level listeners, unguarded message listeners and self.onmessage writes.
The importmap values, script srcs and three.module's internal ./three.core ref
are rewritten to match.
DisplayName becomes "GaussianPack": the namespace enforced on
registerExtension names is derived from it, and "ComfyUI-GaussianPack" made
that prefix invalid. The analysis extension is renamed to match.
js/gaussian_preview.js hooked "PlyPreviewLoadGaussianPLYEnhance", a node id
that appears nowhere in this repo, so the PLY dropdown auto-refresh had never
run; it now targets LoadPLY and LoadPLYOutput, the two nodes that actually carry
the ply_file widget. Guard its message listener on event.source.
Asset seeding resolves the input directory through
folder_paths.get_input_directory(), so it follows ComfyUI Desktop and
--input-directory instead of writing into the code tree.
comfy-test.toml moves to the current schema: [test.workflows] cuda (there is
no "gpu" key -- the accelerator is named by backend, and the old spelling parsed
to an empty list, so CUDA runners silently ran the full unfiltered set), an
explicit [test.platforms] platforms allowlist (per-platform booleans are no
longer supported), and the javascript level.
User wants GaussianPack fully self-contained — no comfy-env in the
runtime path. Three swaps + one orphan deletion:
1. prestartup_script.py: `comfy_env.copy_files(src, dst)` -> stdlib
shutil.copy2 loop. Same semantics (top-level files, non-clobbering),
6 lines. Fixes the NameError that snuck in earlier when the
`from comfy_env import copy_files` line was removed without
replacement; in the test workspace `apple.ply` actually lands in
`input/` now.
2. __init__.py: `comfy_env.register_nodes()` -> `from .nodes import
NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS`. That's literally
what register_nodes() boils down to when no nodes/comfy-env.toml is
present (the no-isolation branch). Hyphenated parent package names
are fine for relative imports — verified earlier in this session
with a Foo-Bar fixture via importlib.import_module.
3. nodes/__init__.py: docstring update — drop the "calls
comfy_env.register_nodes()" mention now that the root does the
relative import directly.
4. comfy-env-root.toml: deleted. The [node_reqs] section only had
meaning for comfy-env's isolation discovery; with no comfy-env in
play it was dead metadata.
`comfy-test.toml` stays (that's a different tool — comfy-test, not
comfy-env). `requirements.txt` stays (numpy + plyfile + NanoGS git).
`grep -rn comfy_env` across the repo returns 0 hits. Import smoke
test in the worker pixi env resolves all 5 nodes
(PreviewGaussians, GaussianMerge, LoadPLY, GaussianAnalysis,
GaussianExport).
Mirrors LiTo's prestartup pattern: on each ComfyUI startup, copies
files from this repo's `assets/` directory (currently apple.ply, ~50MB)
into the host ComfyUI's `input/` directory.
Uses `comfy_env.copy_files`, which is non-clobbering — pre-existing
files in input/ are left alone, so user edits and uploads survive
restarts. Skipped if assets/ is missing (e.g. fresh shallow clone).