Nodes/Bjornulf_custom_nodes/๐Ÿ’พ Huggingface Downloader
ComfyUI Node

๐Ÿ’พ Huggingface Downloader

Pull a model file straight into your ComfyUI folders

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
๐Ÿ’พ Huggingface Downloader
    • status
    โ—„hf_tokenโ–บ
    โ—„repo_idKijai/HunyuanVideo_comfyโ–บ
    โ—„filenamehunyuan_video_vae_bf16.safetensorsโ–บ
    โ—„model_typeโ–พโ–บ
    โ—„custom_pathโ–บ

    This node does one job: given a HuggingFace repo and a filename, it downloads that file straight into the right ComfyUI/models/ subfolder, using your access token for repos that need one. It's the node-graph equivalent of the huggingface-cli download commands the pack's own README walks through for setting up FLUX on a cloud GPU - same idea, just wired into your workflow instead of typed into a terminal.

    Why you'd reach for it

    If you're setting up a workflow that expects a specific model file and you don't have it locally yet, this saves you the context-switch of opening a browser, finding the right HuggingFace page, downloading manually, and placing the file in the correct folder yourself. It's especially handy on a fresh install or a cloud instance - spin up ComfyUI, run a workflow that includes this node once, and the model lands where it needs to be without you leaving the canvas.

    The inputs and outputs that matter

    Four required fields: hf_token, your HuggingFace access token (needed for gated repos - FLUX.1-dev is the standard example, and it requires one); repo_id, the HuggingFace repository to pull from; filename, the exact file within that repo you want; and model_type, a dropdown of the standard ComfyUI model subfolders - models/vae, models/unet, models/clip, models/text_encoders, models/diffusion_models, models/lora, models/controlnet, models/upscale, models/embeddings - which decides where the file lands. There's also an optional custom_path if you want the file somewhere other than the standard folder that model_type implies.

    The single output is status, a string reporting how the download went - worth wiring into a Show node or console log so you know the download actually completed before a downstream node tries to load a file that isn't there yet.

    Installing it

    Through ComfyUI Manager: search Bjornulf_custom_nodes, install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/justUmen/Bjornulf_custom_nodes
    

    Install the shared requirements.txt afterward. You'll also need a HuggingFace account and an access token from huggingface.co/settings/tokens for anything gated - public repos will work with an empty token, but it's simplest to just generate one and always have it on hand.

    Where people get burned

    Large model files take real time and bandwidth - a full-precision text encoder or checkpoint can be several gigabytes, and if the status output doesn't come back until the download finishes, your workflow will appear to hang on this node rather than fail outright. Give it time before assuming it's stuck, especially on a slower connection.

    The other trap is getting repo_id and filename slightly wrong - a typo'd filename, or a repo where the file you want lives in a subdirectory rather than the repo root, will fail the download. Double-check the exact path by browsing the repo's "Files" tab on HuggingFace first, and copy the filename exactly as it appears there rather than guessing at it. And for gated repos specifically, remember you need to have already requested and been granted access to that repo on HuggingFace itself - the token alone doesn't bypass a gate you haven't been approved for.

    CategoryBjornulf

    Inputs (5)

    NameTypeDefaultDescription
    hf_tokenSTRINGโ€”
    repo_idSTRINGKijai/HunyuanVideo_comfyโ€”
    filenameSTRINGhunyuan_video_vae_bf16.safetensorsโ€”
    model_typeCOMBO9 options: models/vae, models/unet, models/clip, models/text_encoders, models/diffusion_models, models/lora, +3
    custom_pathoptSTRINGโ€”

    Outputs (1)

    NameTypeDescription
    statusSTRINGโ€”