Nodes/ComfyUI-IF_AI_tools/Hugging Face Download🤗
ComfyUI Node

Hugging Face Download🤗

A Hugging Face downloader node — handy when your workflow needs a model on the fly

By if-ai·Created 2 years ago·Updated 11 months ago· 701
Hugging Face Download🤗
    • STRING
    repo_id
    file_pathscomma-separated list of files in the repo
    folder_pathfolder in your computer, rename the folder afterwards
    exclude_filescomma-separated list of files to exclude (only for repo download)
    hf_tokenyour Hugging Face token
    modefalse

    Hugging Face Download is the pack's model-shopping node. Instead of dropping into a terminal and typing huggingface-cli download, you type a repo ID into a node, hit run, and the files land on your disk. For a pack that's built around local LLMs and embedding models, that's genuinely useful - workflows you share with someone else can self-provision their own models instead of making them hunt through the Hugging Face hub.

    The shape of it is simple. repo_id is the HF repo, file_paths is a comma-separated list of files to grab, folder_path is where they go, and exclude_files skips files when you're pulling a whole repo. The hf_token field is for gated repos (like Llama or anything behind an access request). There's a mode boolean on the optional side, and the whole thing returns a string - presumably a confirmation or the download path.

    How it works

    The pack ships huggingface_hub in its requirements, and its own transformers_api.py uses snapshot_download under the hood to fetch model files for the transformers provider. This node is the exposed, user-facing version of that same dependency: a thin wrapper around huggingface_hub's download functions. No local model files needed before you run - the node fetches what it's told to.

    One honest caveat: in the archived source that's actually on disk, this node class isn't registered in the pack's NODE_CLASS_MAPPINGS anymore. So depending on which version you end up with, it may not appear in your node list. The capability didn't vanish - it's just that the pack's own model fetching now happens inside the transformers/RAG code paths.

    The inputs that matter

    • repo_id - e.g. impactframes/llama3_if_ai_sdpromptmkr_q4km.
    • file_paths - comma-separated file names within the repo.
    • folder_path - where the files land.
    • hf_token - only needed for gated repos. Keep it private; don't put a token in a workflow you plan to share.

    Installation

    Standard pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/if-ai/ComfyUI-IF_AI_tools.git
    pip install -r requirements.txt
    

    Or via ComfyUI Manager, search "IF_AI_tools", then restart.

    Gotchas

    If the node isn't in your build, don't fight it - ComfyUI Manager has a built-in model downloader, and the Hugging Face CLI does the same job:

    hf download repo_id --local-dir ./models/llm
    

    Also worth remembering: this pack is archived and its successor is comfy-deploy's comfyui-llm-toolkit, which handles model provisioning as part of its templates. For a one-off download, a downloader node is nice, but the terminal is never far away.

    CategoryImpactFrames💥🎞️

    Inputs (6)

    NameTypeDefaultDescription
    repo_idSTRING
    file_pathsSTRINGcomma-separated list of files in the repo
    folder_pathSTRINGfolder in your computer, rename the folder afterwards
    exclude_filesSTRINGcomma-separated list of files to exclude (only for repo download)
    hf_tokenSTRINGyour Hugging Face token
    modeoptBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    STRINGSTRING