Files
macos-tools/stable-diffusion/fix-ltx2-setup.sh
bruno 435834dc79 feat: Harbor 版本化配置
- 添加 Harbor 快速恢复脚本 (harbor-quick-restore.sh)
- 添加完整恢复指南 (HARBOR-RESTORE-GUIDE.md)
- 添加版本信息文件 (VERSION.md)
- 更新 .gitignore 排除敏感数据
- 配置 harbor git remote
- 修复 Cloudflare Tunnel 配置

系统重装后可通过以下命令快速恢复:
git clone http://192.168.1.83:33000/gao/ljwx-harbor.git
cd ljwx-harbor
./harbor-quick-restore.sh
2026-02-27 08:12:30 +08:00

45 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "=== Fixing LTX-2 ComfyUI Setup ==="
# Navigate to ComfyUI directory
cd ~/ComfyUI
# 1. Install missing Python dependencies
echo "Installing missing dependencies..."
/opt/homebrew/opt/[email protected]/bin/python3.12 -m pip install -r requirements.txt
/opt/homebrew/opt/[email protected]/bin/python3.12 -m pip install pydantic-settings spandrel kornia alembic
# 2. Fix Gemma model path issue
echo "Checking Gemma model..."
GEMMA_DIR="models/text_encoders/gemma-3-12b-it-qat-q4_0-unquantized"
if [ ! -f "$GEMMA_DIR/model.safetensors" ]; then
echo "Gemma model needs to be merged. Checking for split files..."
if [ -f "$GEMMA_DIR/model-00001-of-00005.safetensors" ]; then
echo "Found split files. You need to use the full model instead."
echo "Downloading full Gemma model..."
cd models/text_encoders
rm -rf gemma-3-12b-it-qat-q4_0-unquantized
huggingface-cli download google/gemma-3-12b-it-qat-q4_0-unquantized --local-dir gemma-3-12b-it-qat-q4_0-unquantized
cd ../..
fi
fi
# 3. Verify LTX-2 model
echo "Verifying LTX-2 model..."
if [ ! -f "models/checkpoints/ltx-2-19b-dev.safetensors" ]; then
echo "Downloading LTX-2 model..."
huggingface-cli download Lightricks/LTX-2 ltx-2-19b-dev.safetensors --local-dir models/checkpoints
fi
# 4. Verify LoRA
echo "Verifying LoRA..."
if [ ! -f "models/loras/ltx-2-19b-ic-lora-detailer.safetensors" ]; then
echo "Downloading LoRA..."
huggingface-cli download Lightricks/LTX-2-19b-IC-LoRA-Detailer ltx-2-19b-ic-lora-detailer.safetensors --local-dir models/loras
fi
echo "=== Setup Complete ==="
echo "Please restart ComfyUI and try again."