HF Repo Downloader ๐
Pull a whole Hugging Face repo into your models folder
- trigger_signal
- log
Most download nodes grab a single file. This one grabs an entire Hugging Face repository - every shard, the config, the tokenizer, whatever the repo contains - and drops it into a folder you name under your models directory. When a model ships as a multi-file repo rather than one neat .safetensors, this is the node that saves you from downloading each piece by hand.
It's part of ComfyUI-MieNodes (ComfyUI_MieNodes), MieMieeeee's utility pack, under ๐ Downloader.
Why you'd reach for it
Hugging Face is the upstream of the whole open-model world - base models and research weights land there first, as git repositories with real revision history. The KB's Hugging Face panel lays out why that matters: a lot of what you want isn't a single file but a whole repo (sharded weights, a VLM text encoder, a diffusers-layout model), and repos are versioned, so you can pin an exact revision instead of trusting a mutable link.
The default in the node's own fields tells the story - it's pre-filled with a Gemma repo id, i.e. a multi-file language model - which is exactly the case single-file downloaders can't handle. If you've ever needed to fetch a folder-structured model for a workflow and found yourself cloning with git and git-lfs in a terminal, this puts that inside ComfyUI.
How it works
It wraps Hugging Face's own repo-download machinery. You give it a repo id (or a URL) and a save_path, and it fetches the repo into models/<save_path>. Two things make it more than a blunt "download everything":
- Mirror support.
use_hf_mirror(on by default) routes through the hf-mirror endpoint, which is the standard fix when the main Hugging Face CDN is slow or blocked from where you are - a real consideration given the pack's roots in a region where hf.co isn't always reachable. - Pattern filtering.
allow_patternsandexclude_patternslet you pull only part of a repo. Repos often carry the same weights in several formats (fp16, fp8, GGUF, the original PyTorch); grabbing only what you need with an allow-pattern like*.safetensorssaves you tens of gigabytes.
The inputs and outputs that matter
Required:
url_or_repo_id(STRING) - e.g.black-forest-labs/FLUX.2-klein-4B, or a full repo URL.save_path(STRING) - the destination under your models folder, e.g.checkpoints/klein-4b.use_hf_mirror(BOOLEAN, default true) - leave on if the main host is slow for you; turn off to force the official CDN.
The ones you'll actually reach for among the optionals:
hf_token- needed for gated repos. Flux Dev, some Llama/Gemma weights and others sit behind a terms-acceptance gate, and without a token with access the download 401s. Paste a read token here.allow_patterns/exclude_patterns- trim what you pull.revision(defaultmain) - pin a branch, tag, or commit for reproducibility.trigger_signal- sequencing, to run the download at the right point in the graph.
The single output is log (STRING) - wire it into a Show Any node so you can see progress and the final path.
Installing it
ComfyUI Manager โ search ComfyUI-MieNodes โ install โ restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
then restart. It relies on the huggingface_hub library; Manager installs the pack's requirements, and a manual clone may need pip install -r requirements.txt. Nodes appear under ๐ MieNodes.
Common issues & troubleshooting
401 / access denied on a gated model. This is the most common one. Repos like Flux Dev require you to accept terms on the model page and supply an hf_token from an account that's been granted access. Both steps - the click-through and the token - are needed.
You downloaded 60GB you didn't want. A repo with weights in four formats will hand you all four unless you filter. Use allow_patterns (*.safetensors) or exclude_patterns to skip the formats you don't use.
It fetched, but ComfyUI doesn't see the model. save_path decides where it lands. A checkpoint needs to end up under models/checkpoints, a LoRA under models/loras, and so on - put it in the wrong subfolder and the loader won't list it. Point save_path at the right model type.
Don't treat the Hub as permanent. The KB is blunt that official repos can vanish and gated-repo authors can revoke access without notice. Once you've pulled something you depend on, keep the local copy - re-downloading later may not be an option.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| url_or_repo_id | STRING | google/gemma-3-12b-it-qat-q4_0-unquantized | โ |
| save_path | STRING | checkpoints/gemma-3-12b | โ |
| use_hf_mirror | BOOLEAN | true | โ |
| hf_tokenopt | STRING | โ | |
| revisionopt | STRING | main | โ |
| allow_patternsopt | STRING | โ | |
| exclude_patternsopt | STRING | โ | |
| trigger_signalopt | * | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| log | STRING | โ |