- Add WFS_GalleryFeeder custom node (group_name/index/sort_mode/seed → IMAGE) - Add Feeder tab Gallery mode ([Image Loop]/[Gallery] toggle, node selector, group picker, image grid with click-to-set-index, Run/Stop loop) - Add gallery_feeder_extension.js: After Gen combo + Run/Stop widgets on WFS_GalleryFeeder node in ComfyUI canvas (serialize:false, waitForExecution) - Add Gallery thumbnail F button to toggle __Feeder__ group membership (cyan overlay) - Add __Feeder__ reserved group: rename/delete blocked (403 server + disabled UI); FC toolbar button clears members; ensure_group auto-creates on Feeder init - Security: escapeHtml() applied to tag names, filenames, error messages in gallery-tab.js; single-quote escaping added to util.js escapeHtml - Security: _check_path_allowed() added to save_image_meta, toggle_favorite, add_to_group, remove_from_group in gallery_service.py - Security/bugfix: _init_allowed_root() in gallery_routes.py initializes _allowed_root at module load (settings.json → ComfyUI default); fixes serve_image 404 in Feeder Gallery mode and prevents list_folder_tree from overriding _allowed_root - Bugfix: WFS_GalleryFeeder seed max 0x7FFFFFFF → 0xffffffffffffffff (KSampler parity) - Update README, DEVLOG, pyproject.toml to v0.3.42 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
943 B
Python
26 lines
943 B
Python
from .py.wfm import WorkflowStudio
|
|
|
|
NODE_CLASS_MAPPINGS = {}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {}
|
|
WEB_DIRECTORY = "./web/comfyui"
|
|
|
|
# Register routes on import
|
|
WorkflowStudio.add_routes()
|
|
|
|
# Register custom nodes (isolated loading)
|
|
_NODE_MODULES = {
|
|
"WFS_PromptText": (".py.nodes.prompt_text", "WFS_PromptText", "Prompt Text (WFS)"),
|
|
"WFS_GalleryFeeder": (".py.nodes.gallery_feeder_node", "WFS_GalleryFeeder", "Gallery Feeder (WFS)"),
|
|
}
|
|
|
|
for _name, (_mod_path, _cls_name, _display_name) in _NODE_MODULES.items():
|
|
try:
|
|
import importlib
|
|
_mod = importlib.import_module(_mod_path, package=__name__)
|
|
NODE_CLASS_MAPPINGS[_name] = getattr(_mod, _cls_name)
|
|
NODE_DISPLAY_NAME_MAPPINGS[_name] = _display_name
|
|
except Exception as _e:
|
|
print(f"[WARNING] Workflow Studio: Failed to load '{_name}': {_e}")
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|