367ea64dcd679fb1437e17fdb095be32cd5f3ff1
Comfy-Pack
A comprehensive toolkit for standardizing, packaging and deploying ComfyUI workflows as reproducible environments and production-ready REST services.
Features
- Package Everything: Create reproducible
.cpack.zipfiles containing your workflow, custom nodes, model versions, and all dependencies - Standardize Parameters: Define and validate workflow inputs through UI nodes for images, text, numbers and more
- CLI Support: Restore environment and run inference from command line
- REST API Generation: Auto-convert any workflow into REST service with OpenAPI docs
Quick Start
Installation
or
git clone https://github.com/bentoml/comfy-pack.git
Package ComfyUI workspace
- Click "Package" button to create
.cpack.zip - (Optional) select the models that you want to include (only model hash will be recorded)
Unpack ComfyUI project
# Restore a ComfyUI project from cpack files.
comfy-pack unpack workflow.cpack.zip --dir ./
Develop REST service
3. (Optional) pack & run anywhere
# Get the workflow input spec
comfy-pack run workflow.cpack.zip --help
# Run
comfy-pack run workflow.cpack.zip --src-image image.png --video video.mp4
Parameter Nodes
ComfyPack provides custom nodes for standardizing inputs:
- ImageInput: provides
imagetype input, similar to officialLoadImagenode - StringInput: provides
stringtype input, nice for prompts - IntInput: provides
inttype input, suitable for size or seeds - AnyInput: provides
combotype and more input, suitable for custom nodes - ImageOutput: takes
imagetype inputs, similar to officialSaveImagenode, take an image of a bunch of images - FileOutput: takes file path as
stringtype, save and output the file under that path - ...
These nodes help define clear interfaces for your workflow.
Docker Support
Under development
Examples
Check our examples folder for:
- Basic workflow packaging
- Parameter configuration
- API integration
- Docker deployment
License
MIT License
Community
- Issues & Feature Requests: GitHub Issues
- Questions & Discussion: Discord Server
Detailed documentation: under development
Languages
Python
69.7%
JavaScript
30%
Shell
0.3%