3 Commits
Author SHA1 Message Date
PozzettiAndrea b2e82233cb comfy-env-root.toml: [node_reqs] is now [node_packs]
The section never held nodes -- every entry is a whole pack repo. Read
literally, `[node_reqs]` says "the requirements of my node", which is pip
packages, and that section genuinely exists one file over as [dependencies]
in comfy-env.toml. `[node_packs]` names the unit and sits parallel to the
existing [cuda_packages].

Requires comfy-env >= 0.4.27, which renames the key with no shim: the root
file has a closed schema, so an old comfy-env rejects [node_packs] by name
and a new one rejects [node_reqs] by name. Neither fails silently.
2026-08-24 15:48:51 +02:00
PozzettiAndrea f972dcda49 Drop comfy-3d-viewers, modernise comfy-test.toml
Vendor the viewer JavaScript into javascript/ and drop the
comfy-3d-viewers dependency. The viewers were previously copied into web/ at
every startup by prestartup_script.py, which made the served frontend depend on
a second package resolving at runtime.

Bundles are vendored as .mjs so ComfyUI's **/*.js auto-import glob skips them:
they are iframe-only and must never enter the shared main browser realm. Only
the widget entry points stay .js.

Also replace comfy_env.copy_files with a local helper. Its two extra features
(frame-derived source dir, silent no-op on a missing source) were unused here,
and the asset seeding now 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.
2026-08-22 19:44:03 +02:00
PozzettiAndrea 7ecc6d81ac add comfy-kitchen dep 2026-07-31 16:40:10 +02:00
5 changed files with 44 additions and 18 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
[node_reqs]
[node_packs]
ComfyUI-GaussianPack = "PozzettiAndrea/ComfyUI-GaussianPack"
ComfyUI-PanoPack = "PozzettiAndrea/ComfyUI-PanoPack"
+3 -12
View File
@@ -1,18 +1,9 @@
[test]
levels = ["syntax", "install", "registration", "instantiation", "execution"]
levels = ["syntax", "javascript", "install", "registration", "instantiation", "execution"]
[test.workflows]
cpu = ["!pano"]
gpu = "all"
cuda = "all"
[test.platforms]
linux = true
macos = true
windows = true
windows_portable = true
linux_gpu = true
windows_gpu = true
windows_portable_gpu = true
macos_desktop = true
windows_desktop = true
windows_desktop_gpu = true
platforms = ["linux", "macos", "windows", "windows_portable", "macos_desktop", "windows_desktop", "linux_cuda", "windows_cuda", "windows_portable_cuda", "windows_desktop_cuda"]
+38 -3
View File
@@ -1,12 +1,47 @@
"""ComfyUI-Sharp Prestartup Script."""
import logging
import shutil
from pathlib import Path
from comfy_env import setup_env, copy_files
import folder_paths
from comfy_env import setup_env
log = logging.getLogger("sharp")
setup_env()
# The CONFIGURED input directory, never the code-tree one. ComfyUI Desktop
# (--base-directory) and --input-directory both relocate it, and the load
# nodes only ever scan folder_paths.get_input_directory(). main.py runs
# apply_custom_paths() before prestartup scripts, so this is already resolved.
INPUT = Path(folder_paths.get_input_directory())
def copy_files(src: Path, dst: Path, pattern: str = "*") -> int:
"""Copy bundled assets into a directory. Returns files written.
Seeds rather than syncs: an existing file is left alone, so a user's
edited demo asset survives every relaunch. Raises if `src` is missing --
a typo'd asset directory is a packaging bug, and silence is how it stays
one.
"""
src, dst = Path(src), Path(dst)
if not src.is_dir():
raise FileNotFoundError(f"asset directory not found: {src}")
written = 0
for f in src.glob(pattern):
if not f.is_file():
continue
target = dst / f.relative_to(src)
if target.exists():
continue
target.parent.mkdir(parents=True, exist_ok=True)
shutil.copy2(f, target)
written += 1
return written
SCRIPT_DIR = Path(__file__).resolve().parent
COMFYUI_DIR = SCRIPT_DIR.parent.parent
# Copy assets
copy_files(SCRIPT_DIR / "assets", COMFYUI_DIR / "input")
copy_files(SCRIPT_DIR / "assets", INPUT)
+1
View File
@@ -11,4 +11,5 @@ Repository = "https://github.com/PozzettiAndrea/ComfyUI-Sharp"
[tool.comfy]
PublisherId = "pznodes"
DisplayName = "Sharp"
web = "javascript"
Icon = "https://raw.githubusercontent.com/PozzettiAndrea/ComfyUI-Sharp/main/assets/icon.png"
+1 -2
View File
@@ -1,3 +1,2 @@
comfy-env==0.3.89
comfy-3d-viewers==0.2.44
trimesh
trimesh