Multi-user collaboration for the current ComfyUI frontend, continued from ComfyUI-Nexus by daxcay (MIT). - Login page before ComfyUI loads, first-run admin setup, JWT sessions - Personal API keys; server-side permission checks (edit, queue, manager, admin) - Every workflow shared as a live room, with snapshots and history - Per-workflow access lists (view / edit per person) - Conflict-free concurrent edits (id remapping, per-id link merges) - Presence: who is online, cursors, selections, follow mode - Chat with unread badge, blinking icon and sound - Server monitor (CPU, RAM, GPUs, queue) with a floating widget - Admin options to hide the Comfy.org login and API templates - Docs, changelog, screenshots and icon
32 lines
877 B
Python
32 lines
877 B
Python
import logging
|
|
import os
|
|
|
|
import folder_paths
|
|
from server import PromptServer
|
|
|
|
from .rigshare_core.store import Store
|
|
from .rigshare_core.hub import Hub
|
|
from .rigshare_core import routes
|
|
|
|
NODE_CLASS_MAPPINGS = {}
|
|
NODE_DISPLAY_NAME_MAPPINGS = {}
|
|
WEB_DIRECTORY = "./web"
|
|
|
|
|
|
def data_folder():
|
|
return os.environ.get("RIGSHARE_DATA_DIR") or os.path.join(folder_paths.base_path, "rigshare")
|
|
|
|
|
|
if hasattr(PromptServer, "instance"):
|
|
try:
|
|
folder = data_folder()
|
|
os.makedirs(folder, exist_ok=True)
|
|
store = Store(folder)
|
|
hub = Hub(store, PromptServer.instance)
|
|
routes.setup(PromptServer.instance, store, hub)
|
|
logging.info(f"[RigShare] ready, data in {folder}")
|
|
except Exception as e:
|
|
logging.exception(f"[RigShare] failed to start: {e}")
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|