ComfyUI Extension
ComfyUI_HF_ModelDownloader
A ComfyUI extension.
babydjac/ComfyUI_HF_ModelDownloader
Nodes—
On cloudLocal install
Stars0
Updated2 months ago
Readme
ComfyUI HF Model Downloader
Curated Hugging Face model browser + installer for ComfyUI.
This extension adds a popup UI with a persistent floating launcher in the ComfyUI shell, so you can browse official/popular models, filter them, select multiple files, and download directly into the correct Comfy model folders.
What It Adds
- Persistent floating launcher:
Model Browser - Sidebar launch button:
HF Models - Curated multi-owner index (default owners include Comfy-Org, Kijai, black-forest-labs, Tencent-Hunyuan, Qwen, lllyasviel)
- Tabbed browsing by Comfy model category
- Search + filters (family/type, owner, strict filtering toggle)
- Bulk selection and queue-based download with
aria2c - Per-file live progress (each model has its own line/progress/speed in the Downloads view)
- Automatic install path placement:
ComfyUI/models/<category>/<family>/<filename>
- Token settings panel for gated Hugging Face repos
Requirements
- ComfyUI running locally
aria2cinstalled and available inPATH- Python environment used by ComfyUI
- Python dependencies from
requirements.txt
Install
- Place this folder in:
ComfyUI/custom_nodes/ComfyUI_HF_ModelDownloader
- Install Python requirements inside the same environment that runs ComfyUI:
python -m pip install -r requirements.txt
- Restart ComfyUI.
- Hard refresh browser (
Ctrl+Shift+R). - Open
Model Browserfrom the floating launcher orHF Modelsfrom the ComfyUI sidebar.
Quick Start
- Open
Model Browser. - Click
Refresh Index(optional, to pull latest curated list). - Pick a category tab (for example
diffusion_models,loras,vae). - Filter by search / family / owner as needed.
- Select models and click
Download Selected. - Watch per-file progress in the
Downloadsview.
Token for Gated Repos
Use the popup Settings button to save your Hugging Face token.
Save Tokenvalidates token against HF before saving.Clearremoves saved token file.- UI shows masked token + source.
Token resolution order used by backend:
./.hf_tokenin this extension folder/workspace/mod/.hf_tokenHF_TOKEN/HUGGINGFACE_TOKENenvironment variables
Download + Progress Behavior
- Downloader uses
aria2cin queue mode. - Jobs support:
- start
- polling status
- cancel
- Progress sources:
- primary: aria2 JSON-RPC (per-file bytes/speed/progress)
- fallback: local file-size snapshots when RPC data is unavailable
Filtering Behavior
Strict mode is designed to reduce junk entries:
- excludes shard artifacts (
00001-of-00002style files) - excludes diffusers internals/components that are not direct model weights
- applies minimum size heuristics by category
Turn Strict off if you want wider/raw file visibility.
API Routes
All routes are served by this extension:
GET /hf-model-downloader/indexPOST /hf-model-downloader/downloadGET /hf-model-downloader/statusGET /hf-model-downloader/jobsPOST /hf-model-downloader/cancelGET /hf-model-downloader/settingsPOST /hf-model-downloader/token
Development
- Backend runtime dependency:
aiohttp - ComfyUI-provided modules:
folder_paths,server.PromptServer - Indexing and download URLs use each model’s latest commit SHA from the Hugging Face API when available (falls back to
main), so non-maindefault branches stay consistent. - Frontend assets live in
./web - Syntax smoke test:
python -m py_compile __init__.py server.py
- Unit tests (no extra deps):
python -m unittest discover -s tests -q
Repository Standards
- Issues: use the GitHub issue forms for bug reports and feature requests
- Pull requests: follow the checklist in
.github/pull_request_template.md - Contributions: see
CONTRIBUTING.md - Security reporting: see
SECURITY.md - Community expectations: see
CODE_OF_CONDUCT.md
Troubleshooting
- No sidebar button:
- hard refresh browser
- use the persistent floating
Model Browserlauncher
- Gated repo download fails with auth error:
- open
Settingsand save a valid HF token
- open
- Download fails immediately:
- ensure
aria2cis installed and inPATH
- ensure
- Model appears already installed incorrectly:
- installed detection uses filename + size heuristics; refresh index after manual file changes
Notes
- This extension is UI/API focused and does not register graph node classes.
- Frontend assets are served from
./web. - Cached index data is stored in
./.cacheand is intentionally gitignored.