Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates downloading files from Hugging Face Hub with URL/repo ID, supports mirror endpoints, authentication, for AI workflows.
The AD_HFDownload
node is designed to facilitate the downloading of files and directories from the Hugging Face Hub, a popular platform for sharing machine learning models and datasets. This node provides a streamlined way to access resources by allowing you to specify a download URL or repository ID, and it handles the complexities of downloading files or entire subfolders. It supports the use of mirror endpoints to enhance download reliability and speed, and it can manage authentication through Hugging Face tokens for secure access to private repositories. The node is particularly useful for AI artists and developers who need to integrate external resources into their workflows without dealing with the intricacies of direct API interactions.
The download_url
parameter is used to specify the URL of the file or directory you wish to download from the Hugging Face Hub. This URL is parsed to determine the type of resource being accessed, whether it's a file or a subfolder, and whether a mirror endpoint should be used. Providing a valid URL is crucial for the node to function correctly, as it directly influences the download process.
The repo_id
parameter represents the identifier of the repository from which you want to download resources. It is used when a download_url
is not provided, serving as a fallback to ensure that the node can still access the desired content. The repo_id
typically follows the format owner/repo
, and it is essential for identifying the correct repository on the Hugging Face Hub.
The save_path
parameter determines the local directory where the downloaded files or directories will be saved. If not specified, a default path is created within the current working directory. This parameter is important for organizing downloaded content and ensuring that it is stored in a location that is easily accessible for further use.
The resource_type
parameter specifies the type of resource being downloaded, such as a model or dataset. This information is used to configure the download process appropriately, ensuring that the correct type of resource is accessed and stored.
The use_mirror
parameter is a boolean flag that indicates whether to use a mirror endpoint for downloading. Using a mirror can improve download speed and reliability, especially when accessing large files or when the primary endpoint is experiencing high traffic.
The create_folder
parameter is a boolean flag that determines whether a new folder should be created within the save_path
to store the downloaded content. This is useful for keeping downloads organized, particularly when dealing with multiple files or directories from different repositories.
The filename
parameter allows you to specify the name of a specific file to download from the repository. This is particularly useful when you need to access a single file within a larger repository, providing precise control over the download process.
The hf_token
parameter is used to provide an authentication token for accessing private repositories on the Hugging Face Hub. This token ensures that you have the necessary permissions to download content that is not publicly accessible, maintaining the security and privacy of the resources.
The file_path
output parameter provides the local path to the downloaded file or directory. This path is essential for accessing the downloaded content within your local environment, allowing you to integrate it into your workflow seamlessly.
The status
output parameter offers a message indicating the success or failure of the download operation. It provides feedback on whether the download was completed successfully and which endpoint was used, helping you to troubleshoot any issues that may arise during the process.
download_url
or repo_id
is correctly specified to avoid errors in accessing the desired resources.use_mirror
option to improve download speeds, especially for large files or during peak times.create_folder
option, which helps keep your local directory tidy and manageable.download_url
nor a repo_id
is provided, leaving the node without a source to download from.<error_message>
hf_token
is not valid, which prevents access to private repositories.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.