fix: auto-detect RunPod environment and use correct paths
- Automatically detects RunPod environment (checks for /workspace directory) - Uses RunPod paths by default: /workspace/huggingface_cache and /workspace/ComfyUI/models - Falls back to local paths (~/.cache/huggingface and ~/ComfyUI/models) on non-RunPod systems - Updated help text to show both RunPod and local defaults - Updated example YAML with RunPod paths 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -97,11 +97,16 @@ else
|
||||
CONFIG_FILE="" # No config file by default
|
||||
fi
|
||||
|
||||
# Default cache directory (use HuggingFace default)
|
||||
CACHE_DIR="${CACHE_DIR:-${HOME}/.cache/huggingface}"
|
||||
|
||||
# Default ComfyUI models directory
|
||||
COMFYUI_DIR="${COMFYUI_DIR:-${HOME}/ComfyUI/models}"
|
||||
# Default cache directory - detect RunPod or use HuggingFace default
|
||||
if [[ -d "/workspace" ]]; then
|
||||
# RunPod environment
|
||||
CACHE_DIR="${CACHE_DIR:-/workspace/huggingface_cache}"
|
||||
COMFYUI_DIR="${COMFYUI_DIR:-/workspace/ComfyUI/models}"
|
||||
else
|
||||
# Local environment
|
||||
CACHE_DIR="${CACHE_DIR:-${HOME}/.cache/huggingface}"
|
||||
COMFYUI_DIR="${COMFYUI_DIR:-${HOME}/ComfyUI/models}"
|
||||
fi
|
||||
|
||||
# Default command
|
||||
COMMAND="both"
|
||||
@@ -727,8 +732,12 @@ while [[ $# -gt 0 ]]; do
|
||||
echo ""
|
||||
echo "Options:"
|
||||
echo " -c, --config FILE Configuration file (default: NONE)"
|
||||
echo " --cache-dir DIR Cache directory (default: ~/.cache/huggingface)"
|
||||
echo " --comfyui-dir DIR ComfyUI models directory (default: ~/ComfyUI/models)"
|
||||
echo " --cache-dir DIR Cache directory (default: auto-detect)"
|
||||
echo " RunPod: /workspace/huggingface_cache"
|
||||
echo " Local: ~/.cache/huggingface"
|
||||
echo " --comfyui-dir DIR ComfyUI models directory (default: auto-detect)"
|
||||
echo " RunPod: /workspace/ComfyUI/models"
|
||||
echo " Local: ~/ComfyUI/models"
|
||||
echo " -h, --help Show this help message"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
|
||||
Reference in New Issue
Block a user