Commit Graph

10 Commits

Author SHA1 Message Date
e7a4daebe3 fix: convert f-strings in find_model_files to .format() 2025-11-22 16:20:12 +01:00
38f8a04af6 fix: convert all f-strings to .format() to avoid heredoc escaping issues 2025-11-22 16:19:05 +01:00
63c770a86a fix: correct heredoc syntax - args before heredoc marker
- Change from `python3 <<HEREDOC - args` to `python3 - args <<HEREDOC`
- Fixes argument passing to Python scripts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 16:11:36 +01:00
7d35471973 fix: also fix find_model_files to use sys.argv
- Apply same sys.argv pattern to find_model_files function
- Ensures all Python heredocs avoid bash interpolation issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 16:09:11 +01:00
02b7bedafb fix: pass arguments to Python via sys.argv instead of heredoc interpolation
- Use `python3 <<HEREDOC - "$arg1" "$arg2"` pattern
- Avoids bash variable substitution issues in heredoc
- Fixes hanging issue where parse_yaml was silently failing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 16:07:54 +01:00
a52c5979a3 fix: initialize HF_TOKEN before checking if empty
- Initialize HF_TOKEN="${HF_TOKEN:-}" before conditional checks
- Fixes "unbound variable" error with set -euo pipefail

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 16:05:12 +01:00
a59413c021 fix: check multiple locations for .env file
- Try PROJECT_ROOT/ai/.env first
- Fallback to PROJECT_ROOT/.env
- Fallback to /workspace/ai/.env
- Fixes HF_TOKEN loading on RunPod

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 16:04:20 +01:00
c1c4052054 fix: correct HuggingFace cache path detection
- Check for models in cache_dir/models--xxx--yyy/ first
- Fallback to cache_dir/hub/models--xxx--yyy/ for compatibility
- Fixes issue where script couldn't find downloaded models

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 16:02:38 +01:00
a310a08e15 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>
2025-11-22 02:20:46 +01:00
394432ac7d feat: add ComfyUI HuggingFace model downloader script
Adds artifact_comfyui_download.sh for downloading AI models from HuggingFace with configuration-driven approach, beautiful CLI output, and flexible options. Features include optional YAML configuration, customizable cache directory (defaults to ~/.cache/huggingface), HF_TOKEN support, and robust error handling.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-22 02:13:07 +01:00