ComfyUI Extension
ComfyUI_HuggingFace_Downloader
Nodes for auto download models from Hugging Face using their filenames as part of workflows
jnxmx/ComfyUI_HuggingFace_Downloader
Nodes2
On cloudLocal install
CategoryHugging Face Downloaders 🤗
Stars28
Updated21 days ago
Nodes (2)
Readme
Hugging Face Download & Backup
ComfyUI node pack and UI tools for:
- downloading models and folders from Hugging Face
- downloading direct model files from non-HF HTTP(S) URLs
- auto-detecting missing workflow models and queueing downloads
- backing up and restoring ComfyUI content to/from a Hugging Face repo
What This Pack Includes
- 2 ComfyUI nodes:
Hugging Face Download ModelHugging Face Download Folder
- top-menu integration with:
Auto-download modelsModel ExplorerDownload new modelBackup ComfyUI to Hugging Face
- queued downloader with cancel + status panel
- missing-model dialog integration (
Auto-search and download missing models) - selective backup/restore/delete browser for HF backups
Core Features
1) Direct Hugging Face Download Nodes
- Parse
resolve,blob,tree, and shorthand HF links. - Download a single file or a full folder/subfolder.
- Output
model name/folder namefor downstream node wiring. - Choose standard model folders or custom paths.
- Manual
Download new modelalso supports direct non-HF HTTP(S) file URLs.
2) Workflow Auto-Discovery + Missing Model Resolution
- Scans workflow nodes and nested subgraphs.
- Detects:
- found local models
- path mismatches (
Fix Path) - missing models
- Resolves model URLs using:
- workflow metadata
- local curated
metadata/popular-models.json - ComfyUI-Manager model lists/cache when available
- Hugging Face search fallback
- Suggests compatible alternatives for unresolved quantized variants.
3) Background Queue + Status Panel
- Queue selected/manual downloads through
/queue_download. - Poll live progress via
/download_status. - Cancel queued/active jobs via
/cancel_download. - Deferred integrity verification runs after queue idle.
- Refreshes ComfyUI model dropdowns after successful downloads.
4) Backup and Restore to Hugging Face
- Backup selected ComfyUI folders/files into a HF repo under
ComfyUI/*. - Browse remote backup tree from UI.
- Restore all or selected content.
- Delete selected backup entries from the remote repo.
- Handles custom node snapshots with
comfy-cli(custom_nodes_snapshot.yaml). - Strips
downloader.hf_tokenfrom backed-up settings and preserves local token on restore.
Web API Endpoints
GET /folder_structurePOST /check_missing_modelsPOST /install_modelsPOST /queue_downloadPOST /cancel_downloadGET /download_statusGET /search_statusGET /model_libraryGET /api/model_explorer/categoriesGET /api/model_explorer/filtersGET /api/model_explorer/groupsPOST /api/model_explorer/downloadPOST /api/model_explorer/usePOST /api/model_explorer/deleteGET /backup_browser_treePOST /backup_to_hfPOST /backup_selected_to_hfPOST /restore_from_hfPOST /restore_selected_from_hfPOST /delete_from_hf_backupPOST /restart
Settings
Configured in ComfyUI settings:
downloader.hf_token(Hugging Face token)downloader.auto_open_missing_models_on_run(after Run, auto-opens downloader only when native ComfyUI missing-models dialog appears)downloaderbackup.repo_name(target HF repo for backup/restore)downloaderbackup.file_size_limit(max single file size in GB for backup)
Model Explorer is always enabled and has no separate toggle in settings.
Environment variables:
HF_TOKENHF_SEARCH_MAX_CALLS(default200)HF_SEARCH_RATE_LIMIT_SECONDS(default300)HF_SEARCH_MAX_SECONDS(default60)HF_SEARCH_CALL_TIMEOUT(default20)HF_PRIORITY_REPO_SCAN_LIMIT(default100)HF_URL_CHECK_TIMEOUT(default8)HF_DOWNLOADER_SHA_MAX_BYTES(hash verification cap)
Installation
- Clone this repository into your ComfyUI
custom_nodesdirectory. - Install dependencies:
pip install -r requirements.txt
- Restart ComfyUI.
Notes and Current Limits
- Queue download flow is hybrid for file mode:
- Hugging Face links use the Hugging Face engine.
- Non-HF
http(s)file URLs use direct streaming download.
- Folder/full-repo mode remains Hugging Face-only.
- For gated repos, set a valid token via
downloader.hf_tokenorHF_TOKEN.