Nodes/ComfyUI_MieNodes/HF Repo Downloader ๐Ÿ‘
ComfyUI Node

HF Repo Downloader ๐Ÿ‘

Pull a whole Hugging Face repo into your models folder

By MieMieeeeeยทCreated about a year agoยทUpdated 21 days agoยท 225
HF Repo Downloader ๐Ÿ‘
  • trigger_signal
  • log
โ—„url_or_repo_idgoogle/gemma-3-12b-it-qat-q4_0-unquantizedโ–บ
โ—„save_pathcheckpoints/gemma-3-12bโ–บ
โ—„use_hf_mirrortrueโ–บ
โ—„hf_tokenโ–บ
โ—„revisionmainโ–บ
โ—„allow_patternsโ–บ
โ—„exclude_patternsโ–บ

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_patterns and exclude_patterns let 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 *.safetensors saves 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 (default main) - 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.

Category๐Ÿ‘ MieNodes/๐Ÿ‘ Downloader

Inputs (8)

NameTypeDefaultDescription
url_or_repo_idSTRINGgoogle/gemma-3-12b-it-qat-q4_0-unquantizedโ€”
save_pathSTRINGcheckpoints/gemma-3-12bโ€”
use_hf_mirrorBOOLEANtrueโ€”
hf_tokenoptSTRINGโ€”
revisionoptSTRINGmainโ€”
allow_patternsoptSTRINGโ€”
exclude_patternsoptSTRINGโ€”
trigger_signalopt*โ€”

Outputs (1)

NameTypeDescription
logSTRINGโ€”