ComfyUI Extension: ComfyUI LoRA Auto Downloader
Automatically download missing LoRAs from CivitAI and detect missing LoRAs in workflows. Features smart directory detection and easy installation.
Custom Nodes (0)
README
š ComfyUI LoRA Auto Downloader
Automatically detect and download missing LoRAs for your ComfyUI workflows! šÆ
Never again struggle with "LoRA not found" errors! This extension automatically detects missing LoRAs in your workflows and downloads them from CivitAI with a single click.
ā” Quick Start
- Install ā Copy to
ComfyUI/custom_nodes/
- Restart ā Restart ComfyUI
- Add Node ā Find "Auto LoRA Detector" under
loaders
>lora
- Add Token ā Get your CivitAI API token
- Run ā Missing LoRAs download automatically! š
šØ Important Usage Notes
š RESTART REQUIRED After Downloads
ā ļø After LoRAs are downloaded, you MUST restart ComfyUI to see them in your Load LoRA nodes. ComfyUI only scans the LoRA directory on startup.
šÆ Recommended Workflow Setup
For best results, use both nodes together:
- Auto LoRA Detector (for manual testing with
test_mode=True
) - Workflow LoRA Interceptor (for automatic background processing)
This provides both manual control and automatic detection.
ā ļø Note: You may need to run the Workflow LoRA Interceptor twice after ComfyUI startup to properly initialize it.
š Check for Name Variations
Downloaded LoRAs may have slightly different names than expected:
- Different versions, author conventions, or CivitAI naming
Always check your Load LoRA dropdown after download to select the newly available file!
šÆ Perfect For
- ā Fixing "LoRA not found" errors instantly
- ā Sharing workflows without worrying about missing files
- ā Trying new workflows from the community
- ā Managing large LoRA collections efficiently
š¦ Included Nodes
This package includes 4 custom nodes for different use cases:
| Node | Purpose | Best For | Key Feature | |------|---------|----------|-------------| | šÆ Auto LoRA Detector ā | One-click missing LoRA detection & download | Beginners & quick fixes | Simple one-click LoRA detection & download | | š§ LoRA Auto Downloader | Advanced workflow scanning with JSON input | Power users | Manual workflow JSON scanning | | š Workflow Interceptor | Automatic background processing | Set-and-forget automation | Automatic background processing | | š Directory Manager | LoRA collection organization | Collection management | Directory management & cleanup |
šÆ AutoLoRADetector ā (Recommended)
Category: loaders
ā lora
Best for: Beginners and quick fixes
Purpose: Simple detection and downloading of missing LoRAs
š§ LoRAAutoDownloader
Category: loaders
ā lora
Best for: Advanced users with workflow JSON
Purpose: Manual workflow scanning and LoRA downloading
š WorkflowLoRAInterceptor
Category: loaders
ā lora
Best for: Power users wanting automation
Purpose: Automatic workflow interception and processing
š LoRADirectoryManager
Category: loaders
ā lora
Best for: Managing your LoRA collection
Purpose: Directory management and organization tools
š„ Key Features
- š¤ Automatic Detection - Scans workflows for LoRA usage
- š„ Smart Downloads - Finds and downloads from CivitAI automatically
- š”ļø Safe & Secure - Filename sanitization and error handling
- š Progress Reports - Detailed status and download progress
- šØ Multiple Formats - Supports .safetensors, .ckpt, .pt
- š§ Flexible Usage - 4 different nodes for different needs
- šļø Directory Management - Tools for managing and organizing your LoRA collection
- š Workflow Interception - Can hook into the execution system to automatically process all workflows
š Installation
Method 1: Manual Installation (Recommended)
cd ComfyUI/custom_nodes/
git clone https://github.com/LargeModGames/comfyui-lora-auto-downloader.git
# Restart ComfyUI
Method 2: ComfyUI Manager
Coming soon - will be available through ComfyUI Manager
Method 3: Download ZIP
- Download the latest release
- Extract to
ComfyUI/custom_nodes/
- Restart ComfyUI
Manual Installation Steps
-
Copy the
lora_auto_downloader_package
folder to your ComfyUI custom_nodes directory:ComfyUI/custom_nodes/lora_auto_downloader_package/
-
Dependencies are automatically handled - The
requests
library is typically included with ComfyUI- If you encounter import errors, use your ComfyUI's Python environment:
# For portable ComfyUI installations: ComfyUI/python_embeded/python.exe -m pip install requests # For regular Python installations with ComfyUI: python -m pip install requests
-
Restart ComfyUI
š® Usage Examples
Quick Start for Missing LoRAs
The simplest way to handle your missing LoRAs:
- Add the Auto LoRA Detector node to your workflow
- Add your CivitAI API token
- Enable
auto_download
andtest_mode
for testing - Execute the node - it will detect and download missing LoRAs
Advanced Usage with Workflow JSON
1. Add "LoRA Auto Downloader" node
2. Enter your CivitAI token
3. Paste workflow JSON into the text field
4. Run ā Scans and downloads all missing LoRAs
š Smart Matching Features
The extension uses enhanced name matching to find LoRAs even when names don't match exactly:
- ā Handles version differences, case variations, and naming conventions
Manual LoRA Scanning
Use the LoRA Auto Downloader node:
- Add the node to your workflow
- Paste your workflow JSON into the
workflow_data
input - Add your CivitAI API token
- Enable
auto_download
to automatically download missing LoRAs - Execute the node to scan and download
Advanced - Workflow JSON Scanning
1. Add "LoRA Auto Downloader" node
2. Paste your workflow JSON
3. Configure download settings
4. Execute to scan and download
Automatic Workflow Interception
Use the Workflow LoRA Interceptor node:
- Add the node to any workflow
- Enable
enable_auto_mode
- Add your CivitAI API token
- All future workflows will automatically be scanned for missing LoRAs
Directory Management
Use the LoRA Directory Manager node:
- Add the node to check your LoRA directory status
- List all LoRAs with file sizes
- Check for potential duplicates
- Verify directory permissions and disk space
š Detailed Node Reference
šÆ AutoLoRADetector ā
Display Name: "Auto LoRA Detector"
Category: loaders/lora
Best For: Quick fixes and beginners
Inputs:
civitai_token
(STRING): Your CivitAI API tokenauto_download
(BOOLEAN): Whether to download missing LoRAs automatically (default: true)check_missing
(BOOLEAN): Whether to check for missing LoRAs (default: true)trigger_input
(OPTIONAL): Connect any input to trigger the check
Outputs:
status_report
(STRING): Detailed status of missing LoRAs and downloadsmissing_loras_list
(STRING): JSON list of missing LoRAspassthrough
(*): Pass-through for workflow connections
Features:
- ā Detects common missing LoRAs from validation errors
- ā Automatically searches CivitAI for best matches
- ā Downloads missing LoRAs with progress reporting
- ā Simple to use - just add token and run
š§ LoRAAutoDownloader
Display Name: "LoRA Auto Downloader"
Category: loaders/lora
Best For: Advanced users with workflow JSON
Inputs:
workflow_data
(STRING): JSON workflow data to scan for LoRA usagecivitai_token
(STRING): CivitAI API token for downloading modelsauto_download
(BOOLEAN): Automatically download missing LoRAs (default: true)check_only
(BOOLEAN): Only check without downloading (default: false)passthrough_model
(OPTIONAL MODEL): Model to pass throughpassthrough_clip
(OPTIONAL CLIP): CLIP to pass through
Outputs:
status_report
(STRING): Detailed scanning and download reportmissing_loras
(STRING): JSON list of missing LoRAs with metadatamodel
(MODEL): Pass-through modelclip
(CLIP): Pass-through CLIP
Features:
- ā Parses complete workflow JSON for LoRA references
- ā Supports multiple LoRA loader types (LoraLoader, JsonLoraLoader, etc.)
- ā Detailed metadata extraction (strength, node IDs, etc.)
- ā Comprehensive error handling and reporting
š WorkflowLoRAInterceptor
Display Name: "Workflow LoRA Interceptor"
Category: loaders/lora
Best For: Power users wanting full automation
Inputs:
enable_auto_mode
(BOOLEAN): Enable automatic scanning for all workflows (default: false)civitai_token
(STRING): CivitAI API token for downloading modelsdownload_missing
(BOOLEAN): Automatically download missing LoRAs (default: true)scan_current_workflow
(BOOLEAN): Scan the current workflow manually (default: false)manual_workflow_json
(OPTIONAL STRING): Manually provide workflow JSON to scan
Outputs:
status
(STRING): Current status of the interceptormissing_loras_report
(STRING): Report of missing LoRAs
Features:
- ā Hooks into ComfyUI's execution system
- ā Automatically processes ALL workflows when enabled
- ā Background downloading without user intervention
- ā Persistent settings across workflow runs
- ā ļø Advanced feature - use with caution
š LoRADirectoryManager
Display Name: "LoRA Directory Manager"
Category: loaders/lora
Best For: Managing and organizing your LoRA collection
Inputs:
action
(CHOICE): Choose actionlist_loras
: List all LoRA files with sizescheck_directory
: Verify directory status and permissionscleanup_duplicates
: Find potential duplicate files
Outputs:
report
(STRING): Detailed report based on selected action
Features:
- ā Lists all LoRAs with file sizes in MB
- ā Checks directory permissions and disk space
- ā Identifies potential duplicate LoRA files
- ā Provides storage and organization insights
- ā No download functionality - purely management
šÆ Which Node Should I Use?
- Just want to fix missing LoRAs quickly? ā Use
AutoLoRADetector
ā - Have a specific workflow JSON to scan? ā Use
LoRAAutoDownloader
- Want automatic processing for all workflows? ā Use
WorkflowLoRAInterceptor
- Need to manage your LoRA collection? ā Use
LoRADirectoryManager
š CivitAI API Token
Get your free API token:
- Visit CivitAI
- Go to Account Settings ā API Keys
- Generate new API key
- Copy and paste into the node
To download LoRAs from CivitAI, you need an API token:
- Go to CivitAI
- Sign in to your account
- Go to Account Settings > API Keys
- Generate a new API key
- Copy the token and paste it into the node's
civitai_token
field
š Requirements
- ComfyUI (latest version recommended)
- Python 3.8+
- requests library (usually included with ComfyUI)
- CivitAI account (free) for downloads
š Supported Formats
.safetensors
(preferred).ckpt
.pt
š¾ Download Location
LoRAs are downloaded to your ComfyUI LoRA directory, which is automatically detected using ComfyUI's folder system. This is typically the models/loras/
folder within your ComfyUI installation, but the exact path depends on your ComfyUI setup and configuration.
š Why This Extension?
| Problem | Solution | |---------|----------| | ā "LoRA not found" errors break workflows | ā Automatic detection and download | | ā Manual searching and downloading is tedious | ā One-click automation | | ā Sharing workflows requires bundling files | ā Recipients can auto-download missing LoRAs | | ā Managing large collections is messy | ā Built-in organization tools |
š Troubleshooting
Common Issues
| Issue | Solution |
|-------|----------|
| Nodes don't appear | Restart ComfyUI after installation |
| Downloaded LoRAs not visible | ā ļø RESTART ComfyUI after downloads |
| Download fails | Check CivitAI token and internet connection |
| LoRA has different name | Check Load LoRA dropdown for variations |
| Permission errors | Ensure ComfyUI can write to the LoRA directory |
| "requests" import error | Use ComfyUI's Python: ComfyUI/python_embeded/python.exe -m pip install requests
|
ā ļø Critical: Restart After Downloads
ComfyUI only scans the LoRA directory on startup. After downloading new LoRAs:
- Stop ComfyUI completely
- Restart ComfyUI
- Check your Load LoRA nodes for the new files
š Finding Downloaded LoRAs
Downloaded LoRAs may have different names than expected:
- Look for similar names in your Load LoRA dropdown
- Check for version differences (v1.5, v2.0, etc.)
- Search for author names or keywords from the original name
- "Permission denied" errors: Ensure ComfyUI has write permissions to the LoRA directory
- Download failures: Check your internet connection and CivitAI token
- Node not appearing: Restart ComfyUI after installation
- Import errors: If you get "No module named 'requests'", install it using ComfyUI's Python environment (see installation instructions above)
Logging
Check the ComfyUI console for detailed logs during downloading and scanning operations.
š¤ Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Development Setup
git clone https://github.com/LargeModGames/comfyui-lora-auto-downloader.git
cd comfyui-lora-auto-downloader
# Copy to ComfyUI custom_nodes directory
# Make changes and test
š License
This project is licensed under the MIT License - see LICENSE for details.
š Acknowledgments
- ComfyUI for the amazing framework
- CivitAI for providing the LoRA repository
- The ComfyUI community for inspiration and feedback
ā Star History
<div align="center">
Made with ā¤ļø for the ComfyUI community
Report Bug ⢠Request Feature ⢠Discussions
</div>