Visit ComfyUI Online for ready-to-use ComfyUI environment
Automates downloading models from Hugging Face repository for AI projects, saving time and simplifying access.
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.
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.
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.
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.
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
.
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.
repo_id
and filename
parameters are correctly specified to avoid downloading incorrect or non-existent files.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.<status_code>
repo_id
or filename
, or network issues.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.overwrite
parameter is set to False
.overwrite
parameter to True
. Otherwise, ensure that the file name is unique or change the save directory.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.