Skip to content

Conversation

@yt-koike
Copy link

@yt-koike yt-koike commented Jan 30, 2026

This "model downloader" feature is wanted in some issues and PRs including #8436, #12098 and #10224. It also will let Dify self-hosters install ComfyUI server for the Dify plugin more easily as they no longer need to install comfy-asset-downloader.
A issue named Download and install queue shows a user wants a further feature in which users can queue the download tasks but I did not implement that feature.

How to use

Firstly, you need to set Comfy.ModelDownloadEnabled on your settings to True. If you are running ComfyUI on localhost, you can set the value with curl -X POST localhost:8188/settings/Comfy.ModelDownloadEnabled -d "true". Without this, ComfyUI returns 403 Forbidden status code and does not download models.

Secondly, you make a query with the URL of the model, which directory to save it in and the filename. For example, the command curl -X POST localhost:8188/download_model -d '{"url":"https://civitai.com/api/download/models/1714002?type=Model&format=SafeTensor&size=pruned&fp=fp16", "save_dir":"checkpoints"}' will download https://civitai.com/models/1162518/plant-milk-model-suite in checkpoint/ directory.

It works not only for CivitAI but for HuggingFace as curl -X POST localhost:8188/download_model -d '{"url":"https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors", "save_dir":"vae"}' works.
You also can download members-only models by putting your API token on the query like curl -X POST localhost:8188/download_model -d '{"url":"https://civitai.com/api/download/models/2636109?type=Model&format=SafeTensor&size=pruned&fp=fp16", "save_dir":"checkpoints", "token":"..."}'.

Finally, you can use the downloaded model on the workflow.

@yt-koike
Copy link
Author

yt-koike commented Jan 30, 2026

If this PR is merged, I will work on frontends to add a switch UI to control Comfy.ModelDownloadEnabled.

I am also looking forward to updating ComfyUI plugin for Dify too.

@yt-koike
Copy link
Author

Any comments will help! Thank you :)

@yt-koike yt-koike changed the title add model downloader endpoint Jan 30, 2026
@yt-koike yt-koike changed the title Add Model Downloader Endpoint Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant