feat: add ComfyUI symlink functionality and subcommands
Adds subcommand structure (download, link, both) to the ComfyUI downloader script, allowing users to download models from HuggingFace and/or create symlinks to ComfyUI model directories. Features include: - New subcommands: download (download only), link (symlink only), both (default) - ComfyUI directory configuration (--comfyui-dir, default: ~/ComfyUI/models) - Smart symlink creation to appropriate ComfyUI subdirectories (checkpoints, vae, loras, controlnet, upscale_models, etc.) - YAML configuration extended with 'type' and 'filename' fields for precise model organization - Automatic ComfyUI subdirectory creation - Graceful handling of existing symlinks and files - HF_TOKEN validation only when needed (download/both commands) - Example configuration file (comfyui_models.example.yaml) demonstrating proper setup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
80
comfyui_models.example.yaml
Normal file
80
comfyui_models.example.yaml
Normal file
@@ -0,0 +1,80 @@
|
||||
# ComfyUI Models Configuration Example
|
||||
#
|
||||
# This file defines which models to download from HuggingFace
|
||||
# and where to symlink them in your ComfyUI installation.
|
||||
#
|
||||
# Model types correspond to ComfyUI subdirectories:
|
||||
# - checkpoints: Stable Diffusion checkpoints
|
||||
# - vae: VAE models
|
||||
# - loras: LoRA models
|
||||
# - controlnet: ControlNet models
|
||||
# - clip: CLIP models
|
||||
# - clip_vision: CLIP Vision models
|
||||
# - upscale_models: Upscaler models
|
||||
# - embeddings: Textual inversion embeddings
|
||||
# - hypernetworks: Hypernetwork models
|
||||
# - style_models: Style transfer models
|
||||
|
||||
settings:
|
||||
cache_dir: ~/.cache/huggingface
|
||||
parallel_downloads: 1
|
||||
|
||||
model_categories:
|
||||
# Stable Diffusion Checkpoints
|
||||
checkpoints:
|
||||
- repo_id: runwayml/stable-diffusion-v1-5
|
||||
description: Stable Diffusion v1.5
|
||||
size_gb: 4
|
||||
essential: true
|
||||
type: checkpoints
|
||||
filename: "" # Empty means all model files
|
||||
|
||||
- repo_id: stabilityai/stable-diffusion-xl-base-1.0
|
||||
description: SDXL Base 1.0
|
||||
size_gb: 7
|
||||
essential: true
|
||||
type: checkpoints
|
||||
filename: ""
|
||||
|
||||
# VAE Models
|
||||
vae:
|
||||
- repo_id: stabilityai/sd-vae-ft-mse-original
|
||||
description: SD VAE ft MSE
|
||||
size_gb: 0.3
|
||||
essential: true
|
||||
type: vae
|
||||
filename: ""
|
||||
|
||||
# LoRA Models
|
||||
loras:
|
||||
- repo_id: latent-consistency/lcm-lora-sdv1-5
|
||||
description: LCM LoRA for SD v1.5
|
||||
size_gb: 0.1
|
||||
essential: false
|
||||
type: loras
|
||||
filename: ""
|
||||
|
||||
# ControlNet Models
|
||||
controlnet:
|
||||
- repo_id: lllyasviel/control_v11p_sd15_canny
|
||||
description: ControlNet Canny
|
||||
size_gb: 1.4
|
||||
essential: false
|
||||
type: controlnet
|
||||
filename: ""
|
||||
|
||||
- repo_id: lllyasviel/control_v11p_sd15_openpose
|
||||
description: ControlNet OpenPose
|
||||
size_gb: 1.4
|
||||
essential: false
|
||||
type: controlnet
|
||||
filename: ""
|
||||
|
||||
# Upscale Models
|
||||
upscale_models:
|
||||
- repo_id: ai-forever/Real-ESRGAN
|
||||
description: Real-ESRGAN x4
|
||||
size_gb: 0.1
|
||||
essential: false
|
||||
type: upscale_models
|
||||
filename: "RealESRGAN_x4plus.pth"
|
||||
Reference in New Issue
Block a user