How piyushk52/comfy_runner works
Main Components
a) Core Components:
• Workflow Manager (ComfyRunner class)
• Model Manager
• Node Manager
• Server Controller
• File Handler
b) External Components:
• ComfyUI Backend
• Model Sources (Civit, HuggingFace, Replicate, Extra Comfy)
• Custom Nodes Repository
┌─ Client Layer ─────────────────────────────┐
• User Code / API Interface │
• Core Layer ──────────────────────────────┤
• ┌─ Workflow Manager ─┐ ┌─ File Handler ┐│
• (ComfyRunner) │ │ ││
• ┬─┘ └──────────────┘│
• ┌─ Model Manager ──┤ ┌─ Node Manager ┐│
• ┘ └───────────────┘│
• ┌─ Server Controller ┐ ┌─ Utils ────────┤
• Logger ││
• ┘ │ - Status ││
• Tracker ││
• ┘│
• External Layer ───────────────────────────┤
• ┌─ ComfyUI ─────┐ ┌─ Model Sources ───┐│
• Backend │ │ - Civit ││
• HuggingFace ││
• ┘ │ - Replicate ││
• Extra Comfy ││
• ┬─┘│
• ┘
Important Relationships
• Data flow from workflow input to ComfyRunner
• Model Manager interactions with external model sources
• Node Manager interactions with custom node repositories
• Server Controller managing ComfyUI backend
• File Handler managing workflow files and outputs
Technical Details
• Supported file formats (API JSON)
• Model source endpoints
• Output handling paths
• Server management states
Notes for Implementation
• Use standardized UML notation where applicable
• Keep component relationships clear and uncluttered
• Version/commit hash handling
• Client ID tracking mechanism
• Where configuration files are used
Remember to include the key features:
• Automatic node installation
• Model downloading and management
• Server lifecycle management
• Workflow execution pipeline
• Status tracking and logging
This system design should help developers understand how the components interact and how the tool automates the ComfyUI workflow setup and execution process.