Skip to main content

A robust CLI tool for downloading models for ComfyUI

Project description

ComfyDL

PyPI version Python versions License Downloads

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 # Dreamshaper lightning DPM++ SDE

Features

  • Smart Downloads: Automatically places files in the correct models/* subdirectories (e.g., models/ipadapter, models/diffusion_models).
  • Multi-Source Support: Easily download from Hugging Face, Civitai, and more using YAML configurations.
  • Interactive Menu: Select models to download from a user-friendly list.
  • Resumable: Uses aria2c (recommended) or wget for 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) or wget.
    • macOS: brew install aria2
    • Linux: sudo apt install aria2
    • Windows: choco install aria2

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. You can also set a Civitai token if downloading restricted models.

# Set ComfyUI Root Path
comfydl set COMFYUI_ROOT /path/to/your/ComfyUI

# (Optional) Set Civitai API Token
comfydl set CIVITAI_TOKEN your_api_token

# (Optional) Set Hugging Face Token (for private/gated models)
comfydl set HF_TOKEN your_hf_token

These settings are persisted locally in ~/.comfydl_config.

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

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 Direct Download URL
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:

  1. Exact File Path: If you provide a path to a YAML file, it is used directly.
  2. User Global Storage: Checks ~/.comfydl/model_sources/<name>.yaml.
    • Use this to override built-in sources or add personal collections available globally.
  3. Built-in Sources: Checks the model_sources directory bundled with the installed comfydl package.
  4. Local Project Storage: Checks model_sources/<name>.yaml in 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

comfydl-0.1.3.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

comfydl-0.1.3-py3-none-any.whl (62.4 kB view details)

Uploaded Python 3

File details

Details for the file comfydl-0.1.3.tar.gz.

File metadata

  • Download URL: comfydl-0.1.3.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for comfydl-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3aa4205d2b6b4e6e77ab0b8dbd08025bc03e85921e9056d878dc777fb8f51461
MD5 3d1ecb7abbe83f965ef0a2ff8076a2bf
BLAKE2b-256 f3ba3e14756ce62b9bed181025184283d0386640ac8826666f3134a829b00545

See more details on using hashes here.

File details

Details for the file comfydl-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: comfydl-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 62.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for comfydl-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0a8e4ee60067e9b3d580393c06ff88d3d2563206b5c93f008f142dafe7f74fc9
MD5 f6328987ddd377a18a8bb2a4f931044e
BLAKE2b-256 100328e14364cc56da28943a3c087465e16463adbf030e24797848378163c13a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page