mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-03 10:10:20 +08:00
Merge 582619b15d into 09725967cf
This commit is contained in:
commit
2587bc5066
19
Download_and_move.md
Normal file
19
Download_and_move.md
Normal file
@ -0,0 +1,19 @@
|
||||
# ComfyUI Model Organizer
|
||||
|
||||
Bash script to organize and download ComfyUI models into proper directory structure.
|
||||
|
||||
## Usage
|
||||
|
||||
**Fresh Install (Download All Models):**
|
||||
```bash
|
||||
./Download_and_move.sh demo_model.txt /empty/dir /path/to/ComfyUI/models
|
||||
```
|
||||
Downloads all models from URLs in `demo_model.txt` directly to ComfyUI.
|
||||
|
||||
**Organize Existing Downloads:**
|
||||
```bash
|
||||
./Download_and_move.sh demo_model.txt /mnt/some/dir/pool/have/models /path/to/ComfyUI/models --move
|
||||
```
|
||||
Searches `/mnt/1T/Download` for matching files, moves them to proper subdirectories. Missing files are downloaded automatically.
|
||||
|
||||
Add `--dry-run` to preview actions without executing. Use `--copy` instead of `--move` to keep originals.
|
||||
167
Download_and_move.sh
Normal file
167
Download_and_move.sh
Normal file
@ -0,0 +1,167 @@
|
||||
|
||||
usage() {
|
||||
cat << EOF
|
||||
用法: $0 <mapping_file> <source_dir> <dest_dir> [--move|--copy] [--dry-run]
|
||||
|
||||
參數:
|
||||
mapping_file - 映射檔案 (格式: subdir model_name url)
|
||||
source_dir - 來源目錄
|
||||
dest_dir - 目標目錄
|
||||
--move - 移動檔案 (預設)
|
||||
--copy - 複製檔案
|
||||
--dry-run - 僅顯示操作,不實際執行
|
||||
|
||||
範例:
|
||||
$0 models.txt /mnt/1T/Download /home/user/Comfyui/models --move
|
||||
$0 models.txt /mnt/1T/Download /home/user/Comfyui/models --copy --dry-run
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 檢查參數
|
||||
if [ $# -lt 3 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
MAPPING_FILE="$1"
|
||||
SOURCE_DIR="$2"
|
||||
DEST_DIR="$3"
|
||||
ACTION="move"
|
||||
DRY_RUN=false
|
||||
|
||||
# 解析選項
|
||||
shift 3
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
--move)
|
||||
ACTION="move"
|
||||
;;
|
||||
--copy)
|
||||
ACTION="copy"
|
||||
;;
|
||||
--dry-run)
|
||||
DRY_RUN=true
|
||||
;;
|
||||
*)
|
||||
echo "未知選項: $1"
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# 檢查檔案和目錄
|
||||
if [ ! -f "$MAPPING_FILE" ]; then
|
||||
echo "錯誤: 映射檔案 '$MAPPING_FILE' 不存在"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "$SOURCE_DIR" ]; then
|
||||
echo "錯誤: 來源目錄 '$SOURCE_DIR' 不存在"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 統計
|
||||
FOUND=0
|
||||
NOTFOUND=0
|
||||
DOWNLOADED=0
|
||||
FAILED=0
|
||||
|
||||
echo "=========================================="
|
||||
echo "映射檔案: $MAPPING_FILE"
|
||||
echo "來源目錄: $SOURCE_DIR"
|
||||
echo "目標目錄: $DEST_DIR"
|
||||
echo "動作: $ACTION"
|
||||
echo "Dry-run: $DRY_RUN"
|
||||
echo "=========================================="
|
||||
echo ""
|
||||
|
||||
# 讀取映射檔案並處理
|
||||
while IFS= read -r line; do
|
||||
# 跳過空行和註解
|
||||
[[ -z "$line" || "$line" =~ ^[[:space:]]*# ]] && continue
|
||||
|
||||
# 解析行並移除前後空格
|
||||
line=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
|
||||
|
||||
# 跳過空行
|
||||
[[ -z "$line" ]] && continue
|
||||
|
||||
# 解析: subdir / model_name url
|
||||
# 先分割第一個部分 (subdir / model_name)
|
||||
if [[ "$line" =~ ^([^[:space:]]+)[[:space:]]*/[[:space:]]*([^[:space:]]+)[[:space:]]+(.+)$ ]]; then
|
||||
subdir="${BASH_REMATCH[1]}"
|
||||
model_name="${BASH_REMATCH[2]}"
|
||||
url="${BASH_REMATCH[3]}"
|
||||
else
|
||||
echo "警告: 無法解析行: $line"
|
||||
continue
|
||||
fi
|
||||
|
||||
# 移除多餘斜線
|
||||
subdir="${subdir%/}"
|
||||
|
||||
echo "處理: $model_name"
|
||||
echo " 子目錄: $subdir"
|
||||
|
||||
# 在來源目錄遞迴搜尋檔案
|
||||
SOURCE_FILE=$(find "$SOURCE_DIR" -type f -name "$model_name" 2>/dev/null | head -n 1)
|
||||
|
||||
DEST_SUBDIR="$DEST_DIR/$subdir"
|
||||
DEST_FILE="$DEST_SUBDIR/$model_name"
|
||||
|
||||
if [ -n "$SOURCE_FILE" ]; then
|
||||
echo " 找到: $SOURCE_FILE"
|
||||
|
||||
if $DRY_RUN; then
|
||||
echo " [DRY-RUN] 將 $ACTION 到: $DEST_FILE"
|
||||
else
|
||||
# 建立目標子目錄
|
||||
mkdir -p "$DEST_SUBDIR"
|
||||
|
||||
if [ "$ACTION" = "move" ]; then
|
||||
mv -v "$SOURCE_FILE" "$DEST_FILE"
|
||||
echo " 已移動到: $DEST_FILE"
|
||||
else
|
||||
cp -v "$SOURCE_FILE" "$DEST_FILE"
|
||||
echo " 已複製到: $DEST_FILE"
|
||||
fi
|
||||
fi
|
||||
((FOUND++))
|
||||
|
||||
elif [ -n "$url" ]; then
|
||||
echo " 未找到,嘗試下載"
|
||||
echo " URL: $url"
|
||||
|
||||
if $DRY_RUN; then
|
||||
echo " [DRY-RUN] 將下載到: $DEST_FILE"
|
||||
((NOTFOUND++))
|
||||
else
|
||||
mkdir -p "$DEST_SUBDIR"
|
||||
|
||||
if wget -q --show-progress -O "$DEST_FILE" "$url"; then
|
||||
echo " 已下載到: $DEST_FILE"
|
||||
((DOWNLOADED++))
|
||||
else
|
||||
echo " 下載失敗"
|
||||
rm -f "$DEST_FILE"
|
||||
((FAILED++))
|
||||
fi
|
||||
fi
|
||||
|
||||
else
|
||||
echo " 未找到且無下載連結"
|
||||
((NOTFOUND++))
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
done < "$MAPPING_FILE"
|
||||
|
||||
echo "=========================================="
|
||||
echo "處理完成"
|
||||
echo "已處理 (${ACTION}): $FOUND"
|
||||
echo "已下載: $DOWNLOADED"
|
||||
echo "未找到: $NOTFOUND"
|
||||
echo "失敗: $FAILED"
|
||||
echo "=========================================="
|
||||
65
demo_model.txt
Normal file
65
demo_model.txt
Normal file
@ -0,0 +1,65 @@
|
||||
text_encoders / qwen_3_8b_fp8mixed.safetensors https://huggingface.co/Comfy-Org/flux2-klein-9B/resolve/main/split_files/text_encoders/qwen_3_8b_fp8mixed.safetensors
|
||||
vae / flux2-vae.safetensors https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors
|
||||
diffusion_models / flux-2-klein-4b.safetensors https://huggingface.co/Comfy-Org/flux2-klein/resolve/main/split_files/diffusion_models/flux-2-klein-4b.safetensors
|
||||
text_encoders / qwen_3_4b.safetensors https://huggingface.co/Comfy-Org/flux2-klein/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors
|
||||
diffusion_models / flux-2-klein-base-4b.safetensors https://huggingface.co/Comfy-Org/flux2-klein/resolve/main/split_files/diffusion_models/flux-2-klein-base-4b.safetensors
|
||||
diffusion_models / lux-2-klein-base-4b-fp8.safetensors https://huggingface.co/black-forest-labs/FLUX.2-klein-base-4b-fp8/resolve/main/flux-2-klein-base-4b-fp8.safetensors
|
||||
loras / Qwen-Image-Edit-2509-Light-Migration.safetensors https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/loras/Qwen-Image-Edit-2509-Light-Migration.safetensors
|
||||
text_encoders / qwen_2.5_vl_7b_fp8_scaled.safetensors https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors
|
||||
vae / qwen_image_vae.safetensors https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors
|
||||
loras / Qwen-Image-Edit-2509-Lightning-8steps-V1.0-bf16.safetensors https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/Qwen-Image-Edit-2509/Qwen-Image-Edit-2509-Lightning-8steps-V1.0-bf16.safetensors
|
||||
diffusion_models / qwen_image_edit_2509_fp8_e4m3fn.safetensors https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors
|
||||
checkpoints / ltx-2-19b-dev-fp8.safetensors https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-19b-dev-fp8.safetensors
|
||||
text_encoders / gemma_3_12B_it_fp4_mixed.safetensors https://huggingface.co/Comfy-Org/ltx-2/resolve/main/split_files/text_encoders/gemma_3_12B_it_fp4_mixed.safetensors
|
||||
latent_upscale_models / ltx-2-spatial-upscaler-x2-1.0.safetensors https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-spatial-upscaler-x2-1.0.safetensors
|
||||
loras / ltx-2-19b-distilled-lora-384.safetensors https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-19b-distilled-lora-384.safetensors
|
||||
loras / ltx-2-19b-lora-camera-control-dolly-left.safetensors https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Left/resolve/main/ltx-2-19b-lora-camera-control-dolly-left.safetensors
|
||||
checkpoints / ltx-2-19b-dev-fp8.safetensors https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-19b-dev-fp8.safetensors
|
||||
checkpoints / ltx-2-19b-distilled.safetensors https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-19b-distilled.safetensors
|
||||
diffusion_models / lotus-depth-d-v1-1.safetensors https://huggingface.co/Comfy-Org/lotus/resolve/main/lotus-depth-d-v1-1.safetensors
|
||||
vae / vae-ft-mse-840000-ema-pruned.safetensors https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors
|
||||
loras / ltx-2-19b-ic-lora-canny-control.safetensors https://huggingface.co/Lightricks/LTX-2-19b-IC-LoRA-Canny-Control/resolve/main/ltx-2-19b-ic-lora-canny-control.safetensors
|
||||
checkpoints / ltx-2-19b-dev-fp8.safetensors https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-19b-dev-fp8.safetensors
|
||||
loras / ltx-2-19b-lora-camera-control-dolly-left.safetensors https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Left/resolve/main/ltx-2-19b-lora-camera-control-dolly-left.safetensors
|
||||
loras / ltx-2-19b-distilled-lora-384.safetensors https://huggingface.co/Lightricks/LTX-2/resolve/main/ltx-2-19b-distilled-lora-384.safetensors
|
||||
text_encoders / gemma_3_12B_it_fp4_mixed.safetensors https://huggingface.co/Comfy-Org/ltx-2/resolve/main/split_files/text_encoders/gemma_3_12B_it_fp4_mixed.safetensors
|
||||
loras / ltx-2-19b-lora-camera-control-dolly-left.safetensors https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Left/resolve/main/ltx-2-19b-lora-camera-control-dolly-left.safetensors
|
||||
loras / ltx-2-19b-lora-camera-control-dolly-left.safetensors https://huggingface.co/Lightricks/LTX-2-19b-LoRA-Camera-Control-Dolly-Left/resolve/main/ltx-2-19b-lora-camera-control-dolly-left.safetensors
|
||||
vae / qwen_image_vae.safetensors https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors
|
||||
diffusion_models / qwen_image_2512_fp8_e4m3fn.safetensors https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_2512_fp8_e4m3fn.safetensors
|
||||
loras / Qwen-Image-Lightning-4steps-V1.0.safetensors https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/Qwen-Image-Lightning-4steps-V1.0.safetensors
|
||||
loras / Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors https://huggingface.co/lightx2v/Qwen-Image-Edit-2511-Lightning/resolve/main/Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors
|
||||
diffusion_models / qwen_image_edit_2511_bf16.safetensors https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_edit_2511_bf16.safetensors
|
||||
diffusion_models / qwen_image_layered_bf16.safetensors https://huggingface.co/Comfy-Org/Qwen-Image-Layered_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_layered_bf16.safetensors
|
||||
loras / Qwen-Image-Edit-2509-Anything2RealAlpha.safetensors https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/loras/Qwen-Image-Edit-2509-Anything2RealAlpha.safetensors
|
||||
diffusion_models / NewBie-Image-Exp0.1-bf16.safetensors https://huggingface.co/Comfy-Org/NewBie-image-Exp0.1_repackaged/resolve/main/split_files/diffusion_models/NewBie-Image-Exp0.1-bf16.safetensors
|
||||
vae / ae.safetensors https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/vae/ae.safetensors
|
||||
text_encoders / gemma_3_4b_it_bf16.safetensors https://huggingface.co/Comfy-Org/NewBie-image-Exp0.1_repackaged/resolve/main/split_files/text_encoders/gemma_3_4b_it_bf16.safetensors
|
||||
text_encoders / jina_clip_v2_bf16.safetensors https://huggingface.co/Comfy-Org/NewBie-image-Exp0.1_repackaged/resolve/main/split_files/text_encoders/jina_clip_v2_bf16.safetensors
|
||||
vae / flux2-vae.safetensors https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors
|
||||
text_encoders / t5xxl_fp16.safetensors https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp16.safetensors
|
||||
diffusion_models / flux1-fill-dev.safetensors https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/split_files/diffusion_models/flux1-fill-dev.safetensors
|
||||
diffusion_models / Wan21-WanMove_fp8_scaled_e4m3fn_KJ.safetensors https://huggingface.co/Kijai/WanVideo_comfy_fp8_scaled/resolve/main/WanMove/Wan21-WanMove_fp8_scaled_e4m3fn_KJ.safetensors
|
||||
clip_vision / clip_vision_h.safetensors https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/clip_vision/clip_vision_h.safetensors
|
||||
loras / lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Lightx2v/lightx2v_I2V_14B_480p_cfg_step_distill_rank64_bf16.safetensors
|
||||
diffusion_models / kandinsky5lite_t2v_sft_5s.safetensors https://huggingface.co/kandinskylab/Kandinsky-5.0-T2V-Lite-sft-5s/resolve/main/model/kandinsky5lite_t2v_sft_5s.safetensors
|
||||
text_encoders / qwen_2.5_vl_7b_fp8_scaled.safetensors https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors
|
||||
text_encoders / byt5_small_glyphxl_fp16.safetensors https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/text_encoders/byt5_small_glyphxl_fp16.safetensors
|
||||
diffusion_models / hunyuanvideo1.5_1080p_sr_distilled_fp16.safetensors https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/diffusion_models/hunyuanvideo1.5_1080p_sr_distilled_fp16.safetensors
|
||||
vae / hunyuanvideo15_vae_fp16.safetensors https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/vae/hunyuanvideo15_vae_fp16.safetensors
|
||||
diffusion_models / hunyuanvideo1.5_720p_t2v_fp16.safetensors https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/diffusion_models/hunyuanvideo1.5_720p_t2v_fp16.safetensors
|
||||
latent_upscale_models / hunyuanvideo15_latent_upsampler_1080p.safetensors https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/latent_upscale_models/hunyuanvideo15_latent_upsampler_1080p.safetensors
|
||||
text_encoders / qwen_2.5_vl_7b_fp8_scaled.safetensors https://huggingface.co/Comfy-Org/HunyuanVideo_1.5_repackaged/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors
|
||||
loras / wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors
|
||||
loras / wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors
|
||||
audio_encoders / wav2vec2_large_english_fp16.safetensors https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/audio_encoders/wav2vec2_large_english_fp16.safetensors
|
||||
loras / wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors
|
||||
diffusion_models / wan2.1_vace_1.3B_fp16.safetensors https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_vace_1.3B_fp16.safetensors
|
||||
loras / Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors
|
||||
loras / Wan21_CausVid_14B_T2V_lora_rank32.safetensors https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan21_CausVid_14B_T2V_lora_rank32.safetensors
|
||||
checkpoints / stable-audio-open-1.0.safetensors https://huggingface.co/Comfy-Org/stable-audio-open-1.0_repackaged/resolve/main/stable-audio-open-1.0.safetensors
|
||||
text_encoders / t5-base.safetensors https://huggingface.co/ComfyUI-Wiki/t5-base/resolve/main/t5-base.safetensors
|
||||
checkpoints / ace_step_v1_3.5b.safetensors https://huggingface.co/Comfy-Org/ACE-Step_ComfyUI_repackaged/resolve/main/all_in_one/ace_step_v1_3.5b.safetensors?download=true
|
||||
diffusion_models / z_image_turbo_bf16.safetensors https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/diffusion_models/z_image_turbo_bf16.safetensors
|
||||
diffusion_models / qwen_image_edit_2509_fp8_e4m3fn.safetensors https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_edit_2509_fp8_e4m3fn.safetensors
|
||||
loras / Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/Qwen-Image-Edit-2509/Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors
|
||||
Loading…
Reference in New Issue
Block a user