* feat(easy_pattern): add test-pattern node + auto-restart dev-sync Adds an `Easy_Pattern` node (Koolook/Testing) for solid-color frame batches with optional per-frame index overlays — verifies sequence merging, frame insertion, batch indexing, and video-pipeline frame order at a glance. Color inputs use the same `White/Black/Gray/Custom` dropdown idiom `EasyResize_Koolook` already exposes for pad/panel colors, so "Gray" means the same 50% sRGB across nodes. `scripts/sync_to_dev.py` now restarts the live ComfyUI server after a successful sync (via ComfyUI-Manager's `/manager/reboot`). Default-on because dev-sync is only ever invoked to see new code, and Python custom-node files load once at server start — `--no-restart` is the escape hatch. The `RUNTIME_PATHS` manifest also picks up `k_easy_pattern.py` so adding a new top-level node doesn't silently break the pack at import time on the next sync. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(sync-dev): restrict restart URL to http(s) for Bandit B310 `urllib.request.urlopen` accepts arbitrary schemes including `file://`, which Bandit B310 flags as a path-traversal vector. The script's typical caller is the maintainer's own shell, but a typo in `--restart-url` could surprise — and the static gate is right to flag it. Validate the scheme is http/https before the urlopen call and annotate it so Bandit accepts the now-truthful narrowing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
61 lines
2.4 KiB
Python
61 lines
2.4 KiB
Python
from .k_easy_wan22_prompt import NODE_CLASS_MAPPINGS as wan_mappings
|
|
from .k_easy_wan22_prompt import NODE_DISPLAY_NAME_MAPPINGS as wan_display
|
|
|
|
from .k_easy_resize import NODE_CLASS_MAPPINGS as resize_mappings
|
|
from .k_easy_resize import NODE_DISPLAY_NAME_MAPPINGS as resize_display
|
|
|
|
from .k_ai_pipeline import NODE_CLASS_MAPPINGS as pipeline_mappings
|
|
from .k_ai_pipeline import NODE_DISPLAY_NAME_MAPPINGS as pipeline_display
|
|
|
|
from .k_easy_image_batch import NODE_CLASS_MAPPINGS as batch_mappings # Added for new VFX batch node
|
|
from .k_easy_image_batch import NODE_DISPLAY_NAME_MAPPINGS as batch_display # Added for new VFX batch node
|
|
|
|
from .k_easy_track import NODE_CLASS_MAPPINGS as cam_loader_mappings
|
|
from .k_easy_track import NODE_DISPLAY_NAME_MAPPINGS as cam_loader_display
|
|
|
|
from .k_easy_pattern import NODE_CLASS_MAPPINGS as pattern_mappings
|
|
from .k_easy_pattern import NODE_DISPLAY_NAME_MAPPINGS as pattern_display
|
|
|
|
from .forks.radiance_koolook import NODE_CLASS_MAPPINGS as radiance_koolook_mappings
|
|
from .forks.radiance_koolook import NODE_DISPLAY_NAME_MAPPINGS as radiance_koolook_display
|
|
|
|
# Register the Kforge Labs snapshot/preset endpoints. Failure here is
|
|
# non-fatal — the node mappings still load and the rest of the plugin
|
|
# works; only the snapshot feature in the sidebar is unavailable. Both
|
|
# the import itself AND the `install()` call are guarded: a missing
|
|
# `aiohttp` (extremely unusual since it's a ComfyUI hard-dep) or any
|
|
# other module-load exception falls through to the print without
|
|
# crashing the node registry.
|
|
try:
|
|
from . import koolook_routes # noqa: E402
|
|
|
|
if not koolook_routes.install():
|
|
print(
|
|
"[Koolook] PromptServer unavailable at import time; preset routes "
|
|
"(/koolook/presets/*) not registered for this session."
|
|
)
|
|
except Exception as _exc: # pragma: no cover
|
|
print(f"[Koolook] preset routes import failed; node mappings unaffected: {_exc}")
|
|
|
|
NODE_CLASS_MAPPINGS = {
|
|
**wan_mappings,
|
|
**resize_mappings,
|
|
**pipeline_mappings,
|
|
**batch_mappings,
|
|
**cam_loader_mappings,
|
|
**pattern_mappings,
|
|
**radiance_koolook_mappings,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
**wan_display,
|
|
**resize_display,
|
|
**pipeline_display,
|
|
**batch_display,
|
|
**cam_loader_display,
|
|
**pattern_display,
|
|
**radiance_koolook_display,
|
|
}
|
|
|
|
WEB_DIRECTORY = "./web"
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"] |