cozyga commited on
Commit
6bc8afb
·
verified ·
1 Parent(s): 210668e

Update provision.sh

Browse files
Files changed (1) hide show
  1. provision.sh +119 -55
provision.sh CHANGED
@@ -19,7 +19,7 @@
19
  # source /venv/main/bin/activate && ./setup-comfyui-vastai.sh
20
  # =============================================================================
21
 
22
- set -euo pipefail
23
 
24
  # =============================================================================
25
  # Configuration
@@ -30,12 +30,12 @@ COMFYUI_DIR="${COMFYUI_DIR:-${WORKSPACE}/ComfyUI}"
30
  LORA_DIR="${COMFYUI_DIR}/models/loras"
31
  VAE_DIR="${COMFYUI_DIR}/models/vae"
32
  CKPT_DIR="${COMFYUI_DIR}/models/checkpoints"
33
- NODES_DIR="${COMFYUI_DIR}/custom_nodes"
34
- TEXT_ENCODER_DIR="${COMFYUI_DIR}/models/text_encoders"
35
  CLIP_DIR="${COMFYUI_DIR}/models/clip"
 
36
  DIFFUSION_DIR="${COMFYUI_DIR}/models/diffusion_models"
37
- ULTRALYTICS_DIR="${COMFYUI_DIR}/models/ultralytics/bbox"
38
  UPSCALE_DIR="${COMFYUI_DIR}/models/upscale_models"
 
 
39
 
40
  # Activate venv if available (ai-dock template)
41
  if [ -f /venv/main/bin/activate ]; then
@@ -67,74 +67,83 @@ HF_PUBLIC_LORAS=(
67
  "dmd2_sdxl_4step_lora_fp16.safetensors|https://huggingface.co/tianweiy/DMD2/resolve/main/dmd2_sdxl_4step_lora_fp16.safetensors"
68
  )
69
 
70
- # Additional HuggingFace model groups (added from user's list)
71
- HF_TEXT_ENCODERS=(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  "t5xxl_fp8_e4m3fn_scaled.safetensors|https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn_scaled.safetensors"
73
  "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"
74
  )
75
 
76
- HF_CLIPS=(
77
  "qwen_3_4b.safetensors|https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors"
78
  )
79
 
80
- HF_CHECKPOINTS_EXTRA=(
81
- "Qwen-Rapid-AIO-SFW-v23.safetensors|https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/v23/Qwen-Rapid-AIO-SFW-v23.safetensors"
82
- "Qwen-Rapid-AIO-NSFW-v23.safetensors|https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/v23/Qwen-Rapid-AIO-NSFW-v23.safetensors"
83
- "lustifySDXLNSFW_endgame.safetensors|https://huggingface.co/cozyga/test/resolve/main/lustifySDXLNSFW_endgame.safetensors"
84
  )
85
 
86
- HF_VAES_EXTRA=(
87
  "qwen_image_vae.safetensors|https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors"
88
  "flux_vae.safetensors|https://huggingface.co/StableDiffusionVN/Flux/resolve/main/Vae/flux_vae.safetensors"
89
  )
90
 
91
- HF_DIFFUSION=(
92
- "z_image_turbo_bf16.safetensors|https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/diffusion_models/z_image_turbo_bf16.safetensors"
 
93
  )
94
 
95
- HF_ULTRALYTICS=(
96
  "FacesV1.pt|https://huggingface.co/ashllay/YOLO_Models/resolve/e07b01219ff1807e1885015f439d788b038f49bd/bbox/FacesV1.pt"
97
- "nipple.pt|https://huggingface.co/cozyga/test/resolve/main/nipple.pt"
98
- "pussyV2.pt|https://huggingface.co/cozyga/test/resolve/main/pussyV2.pt"
99
  )
100
 
101
- HF_UPSCALE=(
102
- "1x-ITF-SkinDiffDetail-Lite-v1.pth|https://huggingface.co/cozyga/test/resolve/main/1x-ITF-SkinDiffDetail-Lite-v1.pth"
103
- )
104
 
105
- # CivitAI LoRAs (requires CIVITAI_TOKEN)
106
- # Format: "filename|url"
107
- # Explicit filenames avoid the CivitAI redirect long-filename bug
108
- CIVITAI_LORAS=(
109
- "zittitslider.safetensors|https://civitai.com/api/download/models/2478366"
110
- "QwenEditVersatilePoses.safetensors|https://civitai.com/api/download/models/2457989?type=Model&format=SafeTensor"
111
- "sdxlcloseuppussy.safetensors|https://civitai.com/api/download/models/2376235?type=Model&format=SafeTensor"
112
- "amateurphotography.safetensors|https://civitai.com/api/download/models/2363467"
113
- "nextscene.safetensors|https://civitai.com/api/download/models/2337214?type=Model&format=SafeTensor"
114
  )
115
 
116
- # CivitAI VAE models
117
- CIVITAI_VAE=(
118
- "zImage_vae.safetensors|https://civitai.com/api/download/models/2442479"
119
  )
120
 
121
- # CivitAI Checkpoints
122
- CIVITAI_CHECKPOINTS=(
123
- # Pony Diffusion V6 XL (or whichever model ID 798204 maps to — verify this)
124
- "checkpoint.safetensors|https://civitai.com/api/download/models/798204?type=Model&format=SafeTensor&size=full&fp=fp16"
125
- "LustifyENDGAME.safetensors|https://civitai.com/api/download/models/1094291?type=Model&format=SafeTensor&size=pruned&fp=fp16"
126
- "analogMadnessXL.safetensors|https://civitai.com/api/download/models/2207703?type=Model&format=SafeTensor&size=full&fp=fp16"
127
  )
128
 
129
  # Custom nodes to install/update
130
  NODES=(
 
131
  "https://github.com/ltdrdata/ComfyUI-Impact-Pack"
132
- "https://github.com/chflame163/ComfyUI_LayerStyle"
133
- "https://github.com/rgthree/rgthree-comfy"
134
  "https://github.com/yolain/ComfyUI-Easy-Use"
 
 
135
  "https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler"
136
- "https://github.com/cubiq/ComfyUI_essentials"
137
- "https://github.com/ltdrdata/ComfyUI-Impact-Subpack"
138
  "https://github.com/EllangoK/ComfyUI-post-processing-nodes"
139
  "https://github.com/wallish77/wlsh_nodes"
140
  "https://github.com/chrisgoringe/cg-image-filter"
@@ -301,14 +310,17 @@ install_nodes() {
301
 
302
  if [ -d "$path" ]; then
303
  echo " [update] ${dirname}"
304
- (cd "$path" && git pull -q)
305
  else
306
  echo " [clone] ${dirname}"
307
- git clone --recursive -q "$repo" "$path"
 
 
 
308
  fi
309
 
310
  if [ -f "$requirements" ]; then
311
- pip install --no-cache-dir -q -r "$requirements"
312
  fi
313
  done
314
  echo ""
@@ -339,7 +351,8 @@ validate_civitai_token || true
339
  echo ""
340
 
341
  # Create all model directories
342
- mkdir -p "$LORA_DIR" "$VAE_DIR" "$CKPT_DIR"
 
343
 
344
  # --- Custom Nodes ---
345
  install_nodes
@@ -372,6 +385,51 @@ echo "=== CivitAI Checkpoints ==="
372
  download_batch "$CKPT_DIR" "${CIVITAI_TOKEN:-}" "${CIVITAI_CHECKPOINTS[@]}"
373
  echo ""
374
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  # =============================================================================
376
  # Summary
377
  # =============================================================================
@@ -380,13 +438,19 @@ echo "=============================================="
380
  echo " Provisioning complete"
381
  echo "=============================================="
382
  echo ""
383
- echo "LoRAs:"
384
- ls -1 "$LORA_DIR"/*.safetensors 2>/dev/null | wc -l | xargs -I{} echo " {} files in ${LORA_DIR}"
385
- echo ""
386
- echo "VAE:"
387
- ls -1 "$VAE_DIR"/*.safetensors 2>/dev/null | wc -l | xargs -I{} echo " {} files in ${VAE_DIR}"
388
- echo ""
389
- echo "Checkpoints:"
390
- ls -1 "$CKPT_DIR"/*.safetensors 2>/dev/null | wc -l | xargs -I{} echo " {} files in ${CKPT_DIR}"
 
 
 
 
 
 
391
  echo ""
392
- echo "Application will start now."
 
19
  # source /venv/main/bin/activate && ./setup-comfyui-vastai.sh
20
  # =============================================================================
21
 
22
+ set -uo pipefail
23
 
24
  # =============================================================================
25
  # Configuration
 
30
  LORA_DIR="${COMFYUI_DIR}/models/loras"
31
  VAE_DIR="${COMFYUI_DIR}/models/vae"
32
  CKPT_DIR="${COMFYUI_DIR}/models/checkpoints"
 
 
33
  CLIP_DIR="${COMFYUI_DIR}/models/clip"
34
+ TEXT_ENC_DIR="${COMFYUI_DIR}/models/text_encoders"
35
  DIFFUSION_DIR="${COMFYUI_DIR}/models/diffusion_models"
 
36
  UPSCALE_DIR="${COMFYUI_DIR}/models/upscale_models"
37
+ ULTRALYTICS_DIR="${COMFYUI_DIR}/models/ultralytics/bbox"
38
+ NODES_DIR="${COMFYUI_DIR}/custom_nodes"
39
 
40
  # Activate venv if available (ai-dock template)
41
  if [ -f /venv/main/bin/activate ]; then
 
67
  "dmd2_sdxl_4step_lora_fp16.safetensors|https://huggingface.co/tianweiy/DMD2/resolve/main/dmd2_sdxl_4step_lora_fp16.safetensors"
68
  )
69
 
70
+ # CivitAI LoRAs (requires CIVITAI_TOKEN)
71
+ # Format: "filename|url"
72
+ # Explicit filenames avoid the CivitAI redirect long-filename bug
73
+ CIVITAI_LORAS=(
74
+ "zittitslider.safetensors|https://civitai.com/api/download/models/2478366"
75
+ "QwenEditVersatilePoses.safetensors|https://civitai.com/api/download/models/2457989?type=Model&format=SafeTensor"
76
+ "sdxlcloseuppussy.safetensors|https://civitai.com/api/download/models/2376235?type=Model&format=SafeTensor"
77
+ "amateurphotography.safetensors|https://civitai.com/api/download/models/2363467"
78
+ "nextscene.safetensors|https://civitai.com/api/download/models/2337214?type=Model&format=SafeTensor"
79
+ )
80
+
81
+ # CivitAI VAE models
82
+ CIVITAI_VAE=(
83
+ "zImage_vae.safetensors|https://civitai.com/api/download/models/2442479"
84
+ )
85
+
86
+ # CivitAI Checkpoints
87
+ CIVITAI_CHECKPOINTS=(
88
+ "checkpoint.safetensors|https://civitai.com/api/download/models/798204?type=Model&format=SafeTensor&size=full&fp=fp16"
89
+ "LustifyENDGAME.safetensors|https://civitai.com/api/download/models/1094291?type=Model&format=SafeTensor&size=pruned&fp=fp16"
90
+ "analogMadnessXL.safetensors|https://civitai.com/api/download/models/2207703?type=Model&format=SafeTensor&size=full&fp=fp16"
91
+ )
92
+
93
+ # --- HuggingFace public models (various directories) ---
94
+
95
+ HF_PUBLIC_TEXT_ENCODERS=(
96
  "t5xxl_fp8_e4m3fn_scaled.safetensors|https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn_scaled.safetensors"
97
  "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"
98
  )
99
 
100
+ HF_PUBLIC_CLIP=(
101
  "qwen_3_4b.safetensors|https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors"
102
  )
103
 
104
+ HF_PUBLIC_DIFFUSION_MODELS=(
105
+ "z_image_turbo_bf16.safetensors|https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/diffusion_models/z_image_turbo_bf16.safetensors"
 
 
106
  )
107
 
108
+ HF_PUBLIC_VAE=(
109
  "qwen_image_vae.safetensors|https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors"
110
  "flux_vae.safetensors|https://huggingface.co/StableDiffusionVN/Flux/resolve/main/Vae/flux_vae.safetensors"
111
  )
112
 
113
+ HF_PUBLIC_CHECKPOINTS=(
114
+ "Qwen-Rapid-AIO-SFW-v23.safetensors|https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/v23/Qwen-Rapid-AIO-SFW-v23.safetensors"
115
+ "Qwen-Rapid-AIO-NSFW-v23.safetensors|https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO/resolve/main/v23/Qwen-Rapid-AIO-NSFW-v23.safetensors"
116
  )
117
 
118
+ HF_PUBLIC_ULTRALYTICS=(
119
  "FacesV1.pt|https://huggingface.co/ashllay/YOLO_Models/resolve/e07b01219ff1807e1885015f439d788b038f49bd/bbox/FacesV1.pt"
 
 
120
  )
121
 
122
+ # --- HuggingFace private models — cozyga/test (non-lora) ---
 
 
123
 
124
+ HF_PRIVATE_CHECKPOINTS=(
125
+ "lustifySDXLNSFW_endgame.safetensors|https://huggingface.co/cozyga/test/resolve/main/lustifySDXLNSFW_endgame.safetensors"
 
 
 
 
 
 
 
126
  )
127
 
128
+ HF_PRIVATE_UPSCALE=(
129
+ "1x-ITF-SkinDiffDetail-Lite-v1.pth|https://huggingface.co/cozyga/test/resolve/main/1x-ITF-SkinDiffDetail-Lite-v1.pth"
 
130
  )
131
 
132
+ HF_PRIVATE_ULTRALYTICS=(
133
+ "nipple.pt|https://huggingface.co/cozyga/test/resolve/main/nipple.pt"
134
+ "pussyV2.pt|https://huggingface.co/cozyga/test/resolve/main/pussyV2.pt"
 
 
 
135
  )
136
 
137
  # Custom nodes to install/update
138
  NODES=(
139
+ "https://github.com/ltdrdata/ComfyUI-Manager"
140
  "https://github.com/ltdrdata/ComfyUI-Impact-Pack"
141
+ "https://github.com/ltdrdata/ComfyUI-Impact-Subpack"
142
+ "https://github.com/cubiq/ComfyUI_essentials"
143
  "https://github.com/yolain/ComfyUI-Easy-Use"
144
+ "https://github.com/rgthree/rgthree-comfy"
145
+ "https://github.com/chflame163/ComfyUI_LayerStyle"
146
  "https://github.com/numz/ComfyUI-SeedVR2_VideoUpscaler"
 
 
147
  "https://github.com/EllangoK/ComfyUI-post-processing-nodes"
148
  "https://github.com/wallish77/wlsh_nodes"
149
  "https://github.com/chrisgoringe/cg-image-filter"
 
310
 
311
  if [ -d "$path" ]; then
312
  echo " [update] ${dirname}"
313
+ (cd "$path" && git pull -q) || echo " [WARN] git pull failed for ${dirname}, skipping"
314
  else
315
  echo " [clone] ${dirname}"
316
+ git clone --recursive -q "$repo" "$path" || {
317
+ echo " [WARN] git clone failed for ${dirname}, skipping"
318
+ continue
319
+ }
320
  fi
321
 
322
  if [ -f "$requirements" ]; then
323
+ pip install --no-cache-dir -q -r "$requirements" || echo " [WARN] pip install failed for ${dirname}"
324
  fi
325
  done
326
  echo ""
 
351
  echo ""
352
 
353
  # Create all model directories
354
+ mkdir -p "$LORA_DIR" "$VAE_DIR" "$CKPT_DIR" "$CLIP_DIR" "$TEXT_ENC_DIR" \
355
+ "$DIFFUSION_DIR" "$UPSCALE_DIR" "$ULTRALYTICS_DIR"
356
 
357
  # --- Custom Nodes ---
358
  install_nodes
 
385
  download_batch "$CKPT_DIR" "${CIVITAI_TOKEN:-}" "${CIVITAI_CHECKPOINTS[@]}"
386
  echo ""
387
 
388
+ # --- HuggingFace Public Text Encoders ---
389
+ echo "=== HuggingFace Text Encoders ==="
390
+ download_batch "$TEXT_ENC_DIR" "${HF_TOKEN:-}" "${HF_PUBLIC_TEXT_ENCODERS[@]}"
391
+ echo ""
392
+
393
+ # --- HuggingFace Public CLIP ---
394
+ echo "=== HuggingFace CLIP ==="
395
+ download_batch "$CLIP_DIR" "${HF_TOKEN:-}" "${HF_PUBLIC_CLIP[@]}"
396
+ echo ""
397
+
398
+ # --- HuggingFace Public Diffusion Models ---
399
+ echo "=== HuggingFace Diffusion Models ==="
400
+ download_batch "$DIFFUSION_DIR" "${HF_TOKEN:-}" "${HF_PUBLIC_DIFFUSION_MODELS[@]}"
401
+ echo ""
402
+
403
+ # --- HuggingFace Public VAE ---
404
+ echo "=== HuggingFace VAE ==="
405
+ download_batch "$VAE_DIR" "${HF_TOKEN:-}" "${HF_PUBLIC_VAE[@]}"
406
+ echo ""
407
+
408
+ # --- HuggingFace Public Checkpoints ---
409
+ echo "=== HuggingFace Checkpoints (Qwen) ==="
410
+ download_batch "$CKPT_DIR" "${HF_TOKEN:-}" "${HF_PUBLIC_CHECKPOINTS[@]}"
411
+ echo ""
412
+
413
+ # --- HuggingFace Public Ultralytics ---
414
+ echo "=== HuggingFace Ultralytics (YOLO) ==="
415
+ download_batch "$ULTRALYTICS_DIR" "${HF_TOKEN:-}" "${HF_PUBLIC_ULTRALYTICS[@]}"
416
+ echo ""
417
+
418
+ # --- HuggingFace Private Checkpoints (cozyga/test) ---
419
+ echo "=== HuggingFace Private Checkpoints (cozyga/test) ==="
420
+ download_batch "$CKPT_DIR" "${HF_TOKEN:-}" "${HF_PRIVATE_CHECKPOINTS[@]}"
421
+ echo ""
422
+
423
+ # --- HuggingFace Private Upscale Models (cozyga/test) ---
424
+ echo "=== HuggingFace Private Upscale Models (cozyga/test) ==="
425
+ download_batch "$UPSCALE_DIR" "${HF_TOKEN:-}" "${HF_PRIVATE_UPSCALE[@]}"
426
+ echo ""
427
+
428
+ # --- HuggingFace Private Ultralytics (cozyga/test) ---
429
+ echo "=== HuggingFace Private Ultralytics (cozyga/test) ==="
430
+ download_batch "$ULTRALYTICS_DIR" "${HF_TOKEN:-}" "${HF_PRIVATE_ULTRALYTICS[@]}"
431
+ echo ""
432
+
433
  # =============================================================================
434
  # Summary
435
  # =============================================================================
 
438
  echo " Provisioning complete"
439
  echo "=============================================="
440
  echo ""
441
+ for label_dir in \
442
+ "LoRAs|${LORA_DIR}" \
443
+ "Checkpoints|${CKPT_DIR}" \
444
+ "VAE|${VAE_DIR}" \
445
+ "CLIP|${CLIP_DIR}" \
446
+ "Text Encoders|${TEXT_ENC_DIR}" \
447
+ "Diffusion Models|${DIFFUSION_DIR}" \
448
+ "Upscale Models|${UPSCALE_DIR}" \
449
+ "Ultralytics|${ULTRALYTICS_DIR}"; do
450
+ label="${label_dir%%|*}"
451
+ dir="${label_dir#*|}"
452
+ count=$(find "$dir" -maxdepth 1 -type f 2>/dev/null | wc -l | tr -d ' ')
453
+ echo " ${label}: ${count} files"
454
+ done
455
  echo ""
456
+ echo "Application will start now."