Quickstart¶
Get up and running with ComfyGit in 5 minutes. By the end, you'll have created an environment, added custom nodes, and understand the basics of version control for your ComfyUI workflows.
Before you begin¶
Make sure you have:
- ComfyGit installed — Installation guide
- A terminal or command prompt open
- Internet connection for downloading dependencies
Step 1: Initialize your workspace¶
Create a ComfyGit workspace:
This creates ~/comfygit/ with the following structure:
~/comfygit/
├── comfygit_cache/ # Cache for registry, custom nodes, comfyui clones, etc.
├── models/ # Shared models directory
├── environments/ # Your ComfyUI environments
├── logs/ # Environment and workspace logs
└── .metadata/ # Workspace configuration
Custom workspace location
Use a different path: cg init /path/to/workspace
Step 2: Create your first environment¶
Create an isolated ComfyUI environment:
This will:
- Create a new environment called
my-project - Download and install ComfyUI (latest release from github)
- Install PyTorch with GPU support (auto-detected)
- Set it as your active environment
- Take 2-5 minutes depending on your internet speed
What's happening?
ComfyGit is creating an isolated Python environment with UV, downloading ComfyUI from GitHub, and installing dependencies. The --use flag makes this your active environment.
What you'll see:
🚀 Creating environment: my-project
This will download PyTorch and dependencies (may take a few minutes)...
✓ Environment created: my-project
✓ Active environment set to: my-project
Next steps:
• Run ComfyUI: cg run
• Add nodes: cg node add <node-name>
Step 3: Run ComfyUI¶
Start ComfyUI in your environment:
ComfyUI opens at http://localhost:8188
Run in background
Or use screen/tmux to keep it running:
Step 4: Check environment status¶
Open a new terminal and check your environment's status:
Output:
Step 5: Add custom nodes¶
Let's add a custom node from the ComfyUI registry:
This will:
- Look up the node in the ComfyUI registry
- Clone the repository to
custom_nodes/ - Install Python dependencies
- Update
pyproject.toml
Adding nodes from GitHub
Avoid ComfyUI-Manager
ComfyGit replaces ComfyUI-Manager's functionality. Don't install comfyui-manager - use cg node add instead.
Try adding more nodes:
Step 6: Commit your changes¶
Save your environment's current state:
This creates a git commit in the .cec/ directory tracking:
- Custom nodes and their versions
- Python dependencies
- Model references
- Workflow files
Check your commit history:
Output:
Version history for environment 'my-project':
v2: Added depthflow nodes
v1: Initial environment setup
Use 'cg rollback <version>' to restore to a specific version
Step 7: Experiment safely¶
Let's add another node and see how rollback works:
Now roll back to remove that change:
Your environment reverts to the state from your first commit—comfyui-video-helper-suite is removed automatically.
Step 8: Load a workflow¶
Let's resolve dependencies for a workflow. Download a sample workflow JSON file, then:
# Move workflow to ComfyUI/user/default/workflows/
cp /path/to/workflow.json ~/comfygit/environments/my-project/ComfyUI/user/default/workflows/
# Resolve dependencies
cg workflow resolve workflow.json
ComfyGit will:
- Analyze the workflow JSON
- Identify required nodes
- Prompt you to install missing nodes
- Find required models
- Suggest download sources
Auto-install mode
Automatically installs all missing nodes without prompting.
Common workflows¶
Now that you have the basics, here are some common tasks:
Switch between environments¶
# Create another environment
cg create testing --use
# List all environments
cg list
# Switch back to my-project
cg use my-project
Update a custom node¶
# Update to latest version
cg node update comfyui-depthflow-nodes
# View installed nodes
cg node list
Add Python dependencies¶
# Add a package
cg py add requests
# Add from requirements.txt
cg py add -r requirements.txt
# List installed packages
cg py list
Export your environment¶
Share your environment with others:
This creates a tarball containing:
- Node metadata and versions
- Model download URLs
- Python dependencies
- Workflow files
Import on another machine:
Essential commands¶
Here are the most important commands for daily use:
| Command | What it does | Example |
|---|---|---|
cg create |
Create new environment | cg create prod --use |
cg use |
Switch active environment | cg use testing |
cg list |
List all environments | cg list |
cg run |
Start ComfyUI | cg run |
cg status |
Show environment status | cg status |
cg node add |
Add custom node | cg node add comfyui-depthflow-nodes |
cg commit |
Save current state | cg commit -m "message" |
cg log |
List environment commits | cg log |
cg rollback |
Revert to previous state | cg rollback v1 |
cg export |
Export environment | cg export my-pack.tar.gz |
cg import |
Import environment | cg import my-pack.tar.gz |
See the CLI reference for a complete list of commands.
Pro tips for beginners¶
Use tab completion
Install shell completion for faster typing:
Then use Tab to autocomplete environment names, node names, and commands.
Start with a clean environment
Don't add too many nodes at once. Start minimal, add what you need, commit often.
Use descriptive commit messages
Makes it easy to find specific versions later.
Specify PyTorch backend manually
What's next?¶
Now that you've learned the basics, explore more advanced features:
-
Understand workspaces, environments, and how ComfyGit works
-
Learn about registry IDs, GitHub URLs, and local development
-
How the global model index works and CivitAI integration
-
Share environments via tarballs or Git remotes
Getting help¶
- In your terminal: Run
cg --helporcg <command> --help - Documentation: You're here! Browse other guides
- Issues: Report bugs on GitHub Issues
- Discussions: Ask questions on GitHub Discussions