ComfyUI > Nodes > ComfyUI Model Downloader > HF Downloader

ComfyUI Node: HF Downloader

Class Name

HF Downloader

Category
loaders
Author
ciri (Account age: 5628days)
Extension
ComfyUI Model Downloader
Latest Updated
2025-01-04
Github Stars
0.05K

How to Install ComfyUI Model Downloader

Install this extension via the ComfyUI Manager by searching for ComfyUI Model Downloader
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Model Downloader in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

HF Downloader Description

Automates downloading models from Hugging Face repository for AI projects, saving time and simplifying access.

HF Downloader:

The HF Downloader node is designed to facilitate the seamless downloading of models from the Hugging Face repository, a popular platform for hosting and sharing machine learning models. This node is particularly beneficial for AI artists and developers who need to access and utilize pre-trained models for their creative projects. By automating the download process, the HF Downloader saves time and reduces the complexity involved in manually fetching models from the Hugging Face repository. It ensures that the desired models are stored in a specified directory, making them readily available for further use in AI applications. The node's primary function is to connect to the Hugging Face repository using the provided repository ID and filename, and then download the specified model file to a local directory. This capability is crucial for users who want to experiment with different models or integrate them into their workflows without dealing with the intricacies of manual downloads.

HF Downloader Input Parameters:

repo_id

The repo_id parameter specifies the unique identifier of the repository on Hugging Face from which the model will be downloaded. It is a string value that represents the path to the desired model repository, such as ByteDance/SDXL-Lightning. This parameter is crucial as it directs the downloader to the correct location on Hugging Face. The default value is ByteDance/SDXL-Lightning, and it does not support multiline input.

filename

The filename parameter indicates the specific file name of the model to be downloaded from the repository. It is a string value that should match the exact name of the file within the repository, such as sdxl_lightning_2step_lora.safetensors. This parameter ensures that the correct model file is retrieved. The default value is sdxl_lightning_2step_lora.safetensors, and it does not support multiline input.

save_dir

The save_dir parameter defines the local directory path where the downloaded model file will be saved. It is determined by the get_model_dirs() function, which provides a list of available directories. This parameter is essential for organizing and accessing the downloaded models efficiently. There are no default values specified, as it depends on the available directories.

overwrite

The overwrite parameter is a boolean option that determines whether an existing file with the same name should be overwritten. If set to True, the downloader will replace any existing file in the specified directory with the new download. If set to False, the downloader will skip the download if the file already exists. The default value is False.

HF Downloader Output Parameters:

(No output parameters)

The HF Downloader node does not produce any direct output parameters. Its primary function is to download the specified model file to the designated directory, and it does not return any values or data upon completion.

HF Downloader Usage Tips:

  • Ensure that the repo_id and filename parameters are correctly specified to avoid downloading incorrect or non-existent files.
  • Use the overwrite parameter wisely to prevent unintentional loss of existing files. Set it to True only when you are sure you want to replace the existing file.

HF Downloader Common Errors and Solutions:

Failed to download file: <status_code>

  • Explanation: This error occurs when the downloader fails to retrieve the file from the Hugging Face repository, possibly due to an incorrect repo_id or filename, or network issues.
  • Solution: Verify that the repo_id and filename are correct and ensure that your internet connection is stable. Check the status code for more specific information about the failure.

File already exists, not overwriting it.

  • Explanation: This message indicates that the file already exists in the specified directory, and the overwrite parameter is set to False.
  • Solution: If you want to replace the existing file, set the overwrite parameter to True. Otherwise, ensure that the file name is unique or change the save directory.

HF Downloader Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Model Downloader
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.