mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-17 00:43:48 +08:00
Backend changes: - Restored model download API endpoints in server.py - Supports download, pause, resume, cancel operations - Tracks download progress and history Frontend extension package: - Created standalone extension for ComfyUI frontend repository - Automatically adds "Download" buttons to Missing Models dialog - Includes repository of known model URLs (SDXL, SD1.5, VAEs, LoRAs, etc.) - Shows real-time download progress in button (percentage) - Supports custom URLs for unknown models - "Download All" button for bulk downloads The extension works with the separated frontend repository structure. When missing models are detected, users can now download them directly from the dialog without manually finding and moving files. Installation instructions included in frontend_extensions/missingModelsDownloader/README.md 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| missingModelsDownloader.js | ||
| package.json | ||
| README.md | ||
Missing Models Downloader for ComfyUI
This extension adds automatic download functionality to ComfyUI's "Missing Models" dialog, allowing users to download missing models directly from the interface with a single click.
Features
- Automatic Download Buttons: Adds a "Download" button next to each missing model in the dialog
- Known Model Repository: Pre-configured URLs for popular models (SDXL, SD1.5, VAEs, LoRAs, ControlNet, etc.)
- Custom URL Support: Prompts for URL if model is not in the repository
- Real-time Progress: Shows download percentage directly in the button
- Bulk Downloads: "Download All" button for multiple missing models
- Smart Detection: Automatically detects model type and places files in correct folders
Installation
For ComfyUI Frontend Repository
If you're using the separate ComfyUI frontend repository:
- Clone the frontend repository:
git clone https://github.com/Comfy-Org/ComfyUI_frontend.git
cd ComfyUI_frontend
- Copy this extension to the extensions folder:
cp -r path/to/frontend_extensions/missingModelsDownloader web/extensions/
- Build and run the frontend as usual
For ComfyUI with Built-in Frontend
If your ComfyUI still has the built-in frontend:
- Copy the extension files to ComfyUI's web extensions:
cp -r frontend_extensions/missingModelsDownloader ComfyUI/web/extensions/core/
- Restart ComfyUI
Backend Requirements
The backend (ComfyUI server) must have the model downloader API endpoints installed. These are included in the easy-download branch or can be added manually:
- Ensure
app/model_downloader.pyexists - Ensure
comfy_config/download_config.pyexists - Ensure
server.pyincludes the download API endpoints
How It Works
- When ComfyUI shows the "Missing Models" dialog, the extension automatically detects it
- Each missing model gets a "Download" button
- For known models, clicking downloads immediately from the pre-configured source
- For unknown models, you'll be prompted to enter the download URL
- Download progress is shown as a percentage in the button
- Once complete, the model is ready to use (refresh the node to see it)
Supported Model Sources
The extension includes pre-configured URLs for models from:
- HuggingFace: Stable Diffusion models, VAEs, LoRAs
- GitHub: Upscale models (ESRGAN, RealESRGAN)
- ComfyAnonymous: Flux text encoders
Configuration
Edit missingModelsDownloader.js to add more models to the repository:
this.modelRepositories = {
"checkpoints": {
"your_model.safetensors": "https://url/to/model"
}
}
API Endpoints
The extension uses these backend API endpoints:
POST /api/models/download- Start a downloadGET /api/models/download/{task_id}- Check download statusPOST /api/models/download/{task_id}/cancel- Cancel a download
Troubleshooting
If the download buttons don't appear:
- Check the browser console for errors
- Ensure the backend API endpoints are working:
curl http://localhost:8188/api/models/downloads - Verify the extension is loaded (should see
[MissingModelsDownloader]in console)
License
MIT