Skip to content

Model downloader endpoint #12098

@yt-koike

Description

@yt-koike

Feature Idea

I'd like to download models by posting data (model URL, directory to save, authorization token and so on) to http://comfyui.example/download or any other endpoint on ComfyUI server.

The context is that I have worked on ComfyUI plugin for Dify and automated model downloading with comfy-asset-downloader. I think it was a big feature and now the plugin is downloaded nearly 40k times, recording 12th most downloaded plugin of all 498 plugins and the most downloaded plugin among image generative ones. It the model download endpoint was to integrated to the core, we can remove comfy-asset-downloader from dependency and simplify the installation process for users.

I think we need to add switch UI on the setting to turn of and off the download feature because not all of ComfyUI hosts want to have their servers flooded by models. It should be turned off by default and be controllable only via the control panel, not by external access.

What the model downloader endpoint do

  • The endpoint receives POST requests from internal and external users.
  • If "model downloader endpoint" switch on the setting is set to off, it returns "Sorry, model downloader endpoint is disabled. Ask the administrator" error.
  • If it's set to on, it reads data on the request and download the corresponding model to the specified directory.

What the model downloader endpoint don't do (for now)

  • Storage management: It doesn't have to know how much storage is left vacant or which models to delete to clear it up, given most custom nodes which work as model downloaders don't support this feature.
  • User authorization: Although it is important not to allow strangers to download models via the endpoint, we ignore it as the administrator can disable it any time and again most custom nodes do not support user authorization.

Existing Solutions

There are numbers of model downloaders available as custom nodes.

The first one is my favourite because it offers one all-rounder node while others offer several nodes each specialised for CivitAI, HuggingFace and others. I like its simplicity and I think we can take the same parameters(model URL, directory to save, filename and authentication token) on the endpoint as it does.

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureA new feature to add to ComfyUI.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions