msrcam commited on
Commit
48d83aa
·
verified ·
1 Parent(s): 9f1ac82

Update setup_flux2_full.sh

Browse files
Files changed (1) hide show
  1. scripts/setup_flux2_full.sh +12 -12
scripts/setup_flux2_full.sh CHANGED
@@ -1,6 +1,6 @@
1
  #!/bin/bash
2
- # Dataset-Prep v3 — Flux2 Dev Full setup
3
- # Base deps + ComfyUI + Flux2-dev models (80GB+ VRAM needed)
4
  set -e
5
 
6
  echo "=== Dataset-Prep v3: Flux2 Dev Full Setup ==="
@@ -23,11 +23,11 @@ if [ ! -d /workspace/ComfyUI ]; then
23
  cd /workspace
24
  git clone --depth 1 https://github.com/comfyanonymous/ComfyUI.git
25
  cd ComfyUI
26
- uv pip install --system -q -r requirements.txt > /dev/null 2>&1
27
  cd custom_nodes
28
  git clone --depth 1 https://github.com/city96/ComfyUI-GGUF.git 2>/dev/null || true
29
  if [ -d ComfyUI-GGUF ] && [ -f ComfyUI-GGUF/requirements.txt ]; then
30
- uv pip install --system -q -r ComfyUI-GGUF/requirements.txt > /dev/null 2>&1
31
  fi
32
  cd /workspace/ComfyUI
33
  mkdir -p models/unet models/clip models/vae
@@ -42,13 +42,13 @@ nohup python main.py --listen 0.0.0.0 --port 8188 --preview-method auto > /tmp/c
42
  echo $! > /tmp/comfyui.pid
43
  echo "ComfyUI starting on port 8188..."
44
 
45
- # Login to HF for gated repos (FLUX.2-dev is gated)
46
  if [ -n "$HF_TOKEN" ]; then
47
  python3 -c "from huggingface_hub import login; login(token='$HF_TOKEN', add_to_git_credential=False)" 2>/dev/null || true
48
  fi
49
 
50
- # Download Flux2 models
51
- echo "Downloading Flux2 models..."
52
  python3 << 'PYEOF'
53
  from huggingface_hub import hf_hub_download
54
  import os
@@ -58,11 +58,11 @@ clip_dir = "/workspace/ComfyUI/models/clip"
58
  vae_dir = "/workspace/ComfyUI/models/vae"
59
 
60
  downloads = [
61
- # FLUX.2-dev UNET (gated, ~64.5GB)
62
- ("black-forest-labs/FLUX.2-dev", "flux2-dev.safetensors", unet_dir, "flux2-dev.safetensors"),
63
- # Qwen3 8B CLIP encoder (fp8, ~8.5GB) — from msrcam/klein-fleet
64
  ("msrcam/klein-fleet", "clip/qwen3_8b_abliterated_v2-fp8mixed.safetensors", clip_dir, "qwen3_8b_abliterated_v2-fp8mixed.safetensors"),
65
- # Flux2 VAE (~0.3GB) — from msrcam/klein-fleet
66
  ("msrcam/klein-fleet", "vae/flux2-vae.safetensors", vae_dir, "flux2-vae.safetensors"),
67
  ]
68
 
@@ -74,7 +74,7 @@ for repo, hf_file, dest_dir, local_name in downloads:
74
  print(f" Downloading {local_name} from {repo}...")
75
  try:
76
  os.makedirs(dest_dir, exist_ok=True)
77
- path = hf_hub_download(repo_id=repo, filename=hf_file, local_dir=dest_dir, local_dir_use_symlinks=False)
78
  # Flatten if hf put it in a subfolder
79
  if os.path.exists(path) and path != dest:
80
  os.rename(path, dest)
 
1
  #!/bin/bash
2
+ # Dataset-Prep v3 Flux2 Dev Full setup
3
+ # Base deps + ComfyUI + Flux2-dev models
4
  set -e
5
 
6
  echo "=== Dataset-Prep v3: Flux2 Dev Full Setup ==="
 
23
  cd /workspace
24
  git clone --depth 1 https://github.com/comfyanonymous/ComfyUI.git
25
  cd ComfyUI
26
+ uv pip install --system -q -r requirements.txt 2>&1 | tail -3
27
  cd custom_nodes
28
  git clone --depth 1 https://github.com/city96/ComfyUI-GGUF.git 2>/dev/null || true
29
  if [ -d ComfyUI-GGUF ] && [ -f ComfyUI-GGUF/requirements.txt ]; then
30
+ uv pip install --system -q -r ComfyUI-GGUF/requirements.txt 2>&1 | tail -3
31
  fi
32
  cd /workspace/ComfyUI
33
  mkdir -p models/unet models/clip models/vae
 
42
  echo $! > /tmp/comfyui.pid
43
  echo "ComfyUI starting on port 8188..."
44
 
45
+ # Login to HF
46
  if [ -n "$HF_TOKEN" ]; then
47
  python3 -c "from huggingface_hub import login; login(token='$HF_TOKEN', add_to_git_credential=False)" 2>/dev/null || true
48
  fi
49
 
50
+ # Download ALL models from msrcam/klein-fleet ONLY
51
+ echo "Downloading Flux2 models from msrcam/klein-fleet..."
52
  python3 << 'PYEOF'
53
  from huggingface_hub import hf_hub_download
54
  import os
 
58
  vae_dir = "/workspace/ComfyUI/models/vae"
59
 
60
  downloads = [
61
+ # FLUX.2-dev UNET (~9.1GB fp8)
62
+ ("msrcam/klein-fleet", "unet/bigLove_klein1_fp8.safetensors", unet_dir, "bigLove_klein1_fp8.safetensors"),
63
+ # Qwen3 8B CLIP encoder (fp8, ~8.5GB)
64
  ("msrcam/klein-fleet", "clip/qwen3_8b_abliterated_v2-fp8mixed.safetensors", clip_dir, "qwen3_8b_abliterated_v2-fp8mixed.safetensors"),
65
+ # Flux2 VAE (~0.3GB)
66
  ("msrcam/klein-fleet", "vae/flux2-vae.safetensors", vae_dir, "flux2-vae.safetensors"),
67
  ]
68
 
 
74
  print(f" Downloading {local_name} from {repo}...")
75
  try:
76
  os.makedirs(dest_dir, exist_ok=True)
77
+ path = hf_hub_download(repo_id=repo, filename=hf_file, local_dir=dest_dir)
78
  # Flatten if hf put it in a subfolder
79
  if os.path.exists(path) and path != dest:
80
  os.rename(path, dest)