A robust CLI tool for downloading models for ComfyUI
Project description
ComfyDL
ComfyDL is a robust Command Line Interface (CLI) tool for downloading models for ComfyUI. It automates the process of fetching models from various sources (like Hugging Face, Civitai) and placing them into the correct directories within your ComfyUI installation.
Install ComfyUI Models with Ease
comfydl flux1
comfydl flux1_dev_fp8
comfydl pony
comfydl dreamshaper
comfydl common_vae
comfydl qwen_image_edit
comfydl chilloutmix
comfydl civitai 354657 # By Version ID
comfydl civitai "urn:air:zimageturbo:lora:civitai:12345@12345" # By AIR URN
Features
- Smart Downloads: Automatically places files in the correct
models/*subdirectories (e.g.,models/ipadapter,models/diffusion_models). - Installation Status & Audit: Use
sources --installedto see exactly what's installed, including file sizes and partial installation status. - Smart Removal: Safely uninstall models by source name using the
rmcommand, including dry-run and interative modes. - Civitai Integration: Quick download via Model ID, Version ID, URLs, or AIR URNs (
urn:air:...@version). - Resumable: Uses
aria2c(recommended) orwgetfor reliable, resumable downloads. - Configurable: Set your ComfyUI root path and API tokens once, and they are remembered.
Requirements
- Python 3.8+
- Download Tools:
aria2c(highly recommended for speed) orwget.- macOS:
brew install aria2 - Linux:
sudo apt install aria2 - Windows:
choco install aria2
- macOS:
Installation
Via PyPI (Recommended)
pip install comfydl
Via Git
pip install git+https://github.com/ShinChven/comfydl.git
To update:
pip install -U git+https://github.com/ShinChven/comfydl.git
Jupyter / Colab Setup
!apt-get update && apt-get install aria2
!pip install comfydl
!comfydl set COMFYUI_ROOT /content/ComfyUI
!mkdir -p /content/ComfyUI/
Configuration
Before starting, configure your ComfyUI root directory and any necessary API tokens. These settings are persisted locally in ~/.comfydl_config.
| Key | Description | Command Example |
|---|---|---|
COMFYUI_ROOT |
Required. Path to your ComfyUI root directory. | comfydl set COMFYUI_ROOT /path/to/ComfyUI |
CIVITAI_TOKEN |
(Optional) Token for restricted or early access Civitai models. | comfydl set CIVITAI_TOKEN your_token |
HF_TOKEN |
(Optional) Token for private or gated Hugging Face models. | comfydl set HF_TOKEN your_token |
MODEL_SOURCES_PATH |
(Optional) Custom directory to search for YAML model sources. | comfydl set MODEL_SOURCES_PATH /custom/sources |
Usage
Interactive Mode
Simply run comfydl without arguments to launch the interactive menu. You can select multiple model sets to download.
comfydl
Command Line Mode
Download a specific model set directly by name:
# General syntax
comfydl <model_source_name> [comfyui_path_override]
# Examples
comfydl flux
comfydl ipadapters
comfydl z_image
Listing & Checking Models
List all available model sources or check their installation status with file sizes.
# List all available names
comfydl sources
# Check installation status with a detailed tree view and file sizes
comfydl sources --installed
# List all large files in your ComfyUI models directory
comfydl list
Status Indicators:
[✓]Entire source/component is installed.[ ]Source/component is missing.[!]Source is partially installed (some components are missing).
Removing Models
Safely remove files associated with one or more model sources.
# Uninstall a specific source
comfydl rm flux1
# Interactive removal menu
comfydl rm
# Dry run (see what would be deleted)
comfydl rm flux1 --dry-run
# Force removal without confirmation
comfydl rm flux1 -f
Civitai Download
You can quickly download a model from Civitai using its Model Version ID or directly using the download URL. The tool will automatically determine the correct folder (e.g., models/checkpoints, models/loras) based on the model type.
# Using Model Version ID
comfydl civitai 1234567
# Using Civitai AIR URN (must contain @version_id)
comfydl civitai "urn:air:zimageturbo:lora:civitai:2207883@2573412"
# Using Direct Download URL or Model URL with modelVersionId
comfydl civitai "https://civitai.com/models/2207883?modelVersionId=2573412"
comfydl civitai "https://civitai.com/api/download/models/12345?type=Model&format=SafeTensor"
# Optional: Override ComfyUI root path
comfydl civitai 12345 /path/to/ComfyUI
Note: If you have configured CIVITAI_TOKEN, it will be automatically appended to the request to support downloading restricted or early-access models.
Model Sources & Resolution
comfydl resolves model source names (e.g., flux) by checking locations in the following order:
- Exact File Path: If you provide a path to a YAML file, it is used directly.
- Custom Model Sources Path: Checks the directory configured via
comfydl set MODEL_SOURCES_PATH <path>. - User Global Storage: Checks
~/.comfydl/model_sources/<name>.yaml.- Use this to override built-in sources or add personal collections available globally.
- Built-in Sources: Checks the
model_sourcesdirectory bundled with the installedcomfydlpackage. - Local Project Storage: Checks
model_sources/<name>.yamlin your current working directory.
Custom Model Sources
To define your own model source, create a YAML file. You can place it in ~/.comfydl/model_sources/ to make it discoverable by name (e.g., comfydl mysource).
YAML Format Example:
description: "My Custom Model Collection"
downloads:
- url: "https://huggingface.co/some/model.safetensors"
dest: "models/checkpoints/model.safetensors"
- url: "https://civitai.com/api/download/models/12345"
dest: "models/loras/mylora.safetensors"
Contributing
Adding New Default Sources
If you are a maintainer or contributor wishing to add new built-in model sources to the package, please refer to MODEL_SOURCE.md.
Legacy Scripts
The original shell scripts (e.g., download-ipadapters.sh) are still present in the repository for reference but comfydl is the recommended way to download models.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file comfydl-0.1.6.tar.gz.
File metadata
- Download URL: comfydl-0.1.6.tar.gz
- Upload date:
- Size: 26.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87835ddc179773bb77ba4cc8e81a4a6e928ee0977defebe142e702adadcbf75e
|
|
| MD5 |
0c67f077ca52707bf9eed94d92c0bc3f
|
|
| BLAKE2b-256 |
e71efb12eb42013c93ebe457f01b0461a0f6e319e1a905291f318b58330ffddb
|
File details
Details for the file comfydl-0.1.6-py3-none-any.whl.
File metadata
- Download URL: comfydl-0.1.6-py3-none-any.whl
- Upload date:
- Size: 67.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
281cac581b90a4a571b7abbb0132fec41569eccb037b00e523b1eb5e10304661
|
|
| MD5 |
f2915ea2b198c292a2fe6707cec371ec
|
|
| BLAKE2b-256 |
97912fa9e0d5cf02e176633e44307f6ba0542d23639c591b63b671e5953f89d0
|