Improve snapshot reliability and usability
Publish to ComfyUI Registry / Publish Custom Node to Registry (push) Canceled after 0s
Tests / test (push) Canceled after 0s

This commit is contained in:
2026-08-24 23:50:31 +02:00
parent 6648d4b9d6
commit ff59e58b33
11 changed files with 1487 additions and 579 deletions
+13 -5
View File
@@ -5,9 +5,17 @@ Automatically snapshots workflow state as you edit, with a sidebar panel
to browse and restore any previous version. Stored in server-side JSON files.
"""
from . import snapshot_routes
from .snapshot_node import SaveSnapshot
WEB_DIRECTORY = "./js"
NODE_CLASS_MAPPINGS = {"SaveSnapshot": SaveSnapshot}
NODE_DISPLAY_NAME_MAPPINGS = {"SaveSnapshot": "Save Snapshot"}
# ComfyUI loads custom nodes as packages. Test runners may import this file as
# a standalone module while discovering tests; avoid trying to register routes
# until package-relative imports are available.
if __package__:
from . import snapshot_routes
from .snapshot_node import SaveSnapshot
NODE_CLASS_MAPPINGS = {"SaveSnapshot": SaveSnapshot}
NODE_DISPLAY_NAME_MAPPINGS = {"SaveSnapshot": "Save Snapshot"}
else:
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}