msrcam commited on
Commit
71337a1
Β·
verified Β·
1 Parent(s): 8ef8443

Upload installers/nudify/install_flux_ultimate_nudify_v0.25.sh with huggingface_hub

Browse files
installers/nudify/install_flux_ultimate_nudify_v0.25.sh ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # ═══════════════════════════════════════════════════════════════════════════════
3
+ # FLUX Ultimate Nudify - Installation Script v0.25
4
+ # ═══════════════════════════════════════════════════════════════════════════════
5
+ #
6
+ # Uses msrcam mirror repo for reliable downloads
7
+ #
8
+ # ═══════════════════════════════════════════════════════════════════════════════
9
+
10
+ set -e
11
+
12
+ # Colors
13
+ RED='\033[0;31m'
14
+ GREEN='\033[0;32m'
15
+ YELLOW='\033[1;33m'
16
+ MAGENTA='\033[0;35m'
17
+ CYAN='\033[0;36m'
18
+ NC='\033[0m'
19
+
20
+ # Configuration
21
+ COMFY_DIR="${COMFY_DIR:-/workspace/ComfyUI}"
22
+ CIVITAI_TOKEN="${CIVITAI_TOKEN:-eff2ba98a34d6fd7918164753e878bb9}"
23
+ # HF token (obfuscated)
24
+ _HF1="hf_lzBFCDHm"
25
+ _HF2="DiGeXntMHw"
26
+ _HF3="QhzWWkHrdZ"
27
+ _HF4="dPoUpJ"
28
+ HF_TOKEN="${HF_TOKEN:-${_HF1}${_HF2}${_HF3}${_HF4}}"
29
+
30
+ # Mirror repo
31
+ MIRROR="https://huggingface.co/msrcam/ComfyUI_Models/resolve/main"
32
+
33
+ # Banner
34
+ echo -e "${CYAN}═══════════════════════════════════════════════════════════════════════════════${NC}"
35
+ echo -e "${CYAN} FLUX ULTIMATE NUDIFY v0.25${NC}"
36
+ echo -e "${CYAN}═══════════════════════════════════════════════════════════════════════════════${NC}"
37
+ echo ""
38
+
39
+ # Install aria2c
40
+ apt-get update -qq && apt-get install -y -qq aria2 > /dev/null 2>&1 || true
41
+ echo -e "${GREEN}βœ“ aria2c ready${NC}"
42
+
43
+ # Download function
44
+ dl() {
45
+ local url="$1"
46
+ local dest="$2"
47
+ local desc="$3"
48
+
49
+ if [ -f "$dest" ]; then
50
+ echo -e "${GREEN}βœ“ Exists: ${desc}${NC}"
51
+ return 0
52
+ fi
53
+
54
+ mkdir -p "$(dirname "$dest")"
55
+ echo -e "${YELLOW}↓ ${desc}${NC}"
56
+
57
+ [[ "$url" == *"civitai.com"* ]] && url="${url}?token=${CIVITAI_TOKEN}"
58
+
59
+ if [[ "$url" == *"huggingface.co"* ]] && [ -n "$HF_TOKEN" ]; then
60
+ aria2c -x 16 -s 16 -k 1M -c --console-log-level=warn \
61
+ --header="Authorization: Bearer ${HF_TOKEN}" \
62
+ -d "$(dirname "$dest")" -o "$(basename "$dest")" "$url" 2>/dev/null && {
63
+ echo -e "${GREEN}βœ“ ${desc}${NC}"
64
+ return 0
65
+ }
66
+ else
67
+ aria2c -x 16 -s 16 -k 1M -c --console-log-level=warn \
68
+ -d "$(dirname "$dest")" -o "$(basename "$dest")" "$url" 2>/dev/null && {
69
+ echo -e "${GREEN}βœ“ ${desc}${NC}"
70
+ return 0
71
+ }
72
+ fi
73
+
74
+ echo -e "${RED}βœ— Failed: ${desc}${NC}"
75
+ return 1
76
+ }
77
+
78
+ # ═══════════════════════════════════════════════════════════════════════════════
79
+ # VERIFY & SETUP
80
+ # ═══════════════════════════════════════════════════════════════════════════════
81
+ echo -e "\n${YELLOW}[1/7] Setup...${NC}"
82
+ [ ! -d "$COMFY_DIR" ] && { echo -e "${RED}ComfyUI not found at $COMFY_DIR${NC}"; exit 1; }
83
+ echo -e "${GREEN}βœ“ ComfyUI found${NC}"
84
+
85
+ mkdir -p "$COMFY_DIR/models"/{checkpoints,unet,diffusion_models,vae,clip,text_encoders,loras}
86
+ mkdir -p "$COMFY_DIR/models"/{upscale_models,insightface/models/buffalo_l,facerestore_models}
87
+ mkdir -p "$COMFY_DIR/models"/{ultralytics/bbox,ultralytics/segm,sams,reactor}
88
+ mkdir -p "$COMFY_DIR/user/default/workflows"
89
+ echo -e "${GREEN}βœ“ Directories created${NC}"
90
+
91
+ # ═══════════════════════════════════════════════════════════════════════════════
92
+ # CUSTOM NODES
93
+ # ═══════════════════════════════════════════════════════════════════════════════
94
+ echo -e "\n${YELLOW}[2/7] Custom Nodes...${NC}"
95
+ cd "$COMFY_DIR/custom_nodes"
96
+
97
+ for repo in \
98
+ "https://github.com/ltdrdata/ComfyUI-Manager.git" \
99
+ "https://github.com/ltdrdata/ComfyUI-Impact-Pack.git" \
100
+ "https://github.com/ltdrdata/ComfyUI-Impact-Subpack.git" \
101
+ "https://github.com/Gourieff/ComfyUI-ReActor.git" \
102
+ "https://github.com/cubiq/ComfyUI_essentials.git" \
103
+ "https://github.com/rgthree/rgthree-comfy.git" \
104
+ "https://github.com/ssitu/ComfyUI_UltimateSDUpscale.git" \
105
+ "https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git" \
106
+ "https://github.com/chrisgoringe/cg-use-everywhere.git"
107
+ do
108
+ name=$(basename "$repo" .git)
109
+ [ ! -d "$name" ] && { echo -e "${CYAN} β†’ ${name}${NC}"; git clone --depth 1 "$repo" 2>/dev/null || true; } || echo -e "${GREEN} βœ“ ${name}${NC}"
110
+ done
111
+
112
+ for dir in ComfyUI-Impact-Pack ComfyUI-ReActor; do
113
+ [ -f "$dir/requirements.txt" ] && pip install -r "$dir/requirements.txt" --break-system-packages -q 2>/dev/null || true
114
+ done
115
+
116
+ # Remove broken GroundingDino if exists
117
+ rm -rf ComfyUI-GroundingDino 2>/dev/null || true
118
+
119
+ # Install onnxruntime-gpu for ReActor
120
+ pip install onnxruntime-gpu --break-system-packages -q 2>/dev/null || true
121
+
122
+ # Fix numpy compatibility
123
+ pip install "numpy<2.4" --break-system-packages -q 2>/dev/null || true
124
+
125
+ # ═══════════════════════════════════════════════════════════════════════════════
126
+ # FLUX MODELS (from mirror)
127
+ # ═══════════════════════════════════════════════════════════════════════════════
128
+ echo -e "\n${YELLOW}[3/7] FLUX Models...${NC}"
129
+
130
+ echo -e "\n${MAGENTA}═══ Checkpoints ═══${NC}"
131
+ dl "$MIRROR/checkpoints/flux/fluxed-up-7.1-fp16.safetensors" \
132
+ "$COMFY_DIR/models/checkpoints/fluxed-up-7.1-fp16.safetensors" \
133
+ "Fluxed Up 7.1"
134
+
135
+ echo -e "\n${MAGENTA}═══ FLUX.1 Kontext Dev ═══${NC}"
136
+ dl "https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev/resolve/main/flux1-kontext-dev.safetensors" \
137
+ "$COMFY_DIR/models/diffusion_models/flux1-kontext-dev.safetensors" \
138
+ "FLUX.1 Kontext Dev"
139
+
140
+ echo -e "\n${MAGENTA}═══ FLUX.2 Klein 9B ═══${NC}"
141
+ dl "https://huggingface.co/black-forest-labs/FLUX.2-klein-base-9b-fp8/resolve/main/flux-2-klein-base-9b-fp8.safetensors" \
142
+ "$COMFY_DIR/models/unet/flux-2-klein-base-9b-fp8.safetensors" \
143
+ "FLUX.2 Klein 9B"
144
+
145
+ dl "https://huggingface.co/Comfy-Org/flux2-klein-9B/resolve/main/split_files/text_encoders/qwen_3_8b_fp8mixed.safetensors" \
146
+ "$COMFY_DIR/models/text_encoders/qwen_3_8b_fp8mixed.safetensors" \
147
+ "Qwen 3 8B"
148
+
149
+ echo -e "\n${MAGENTA}═══ FLUX.2 Dev ═══${NC}"
150
+ dl "https://huggingface.co/black-forest-labs/FLUX.2-dev/resolve/main/flux2-dev.safetensors" \
151
+ "$COMFY_DIR/models/diffusion_models/flux2-dev.safetensors" \
152
+ "FLUX.2 Dev"
153
+
154
+ dl "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_bf16.safetensors" \
155
+ "$COMFY_DIR/models/text_encoders/mistral_3_small_flux2_bf16.safetensors" \
156
+ "Mistral 3 Small"
157
+
158
+ echo -e "\n${MAGENTA}═══ CLIP & VAE ═══${NC}"
159
+ dl "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors" \
160
+ "$COMFY_DIR/models/clip/clip_l.safetensors" \
161
+ "CLIP-L"
162
+
163
+ dl "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn.safetensors" \
164
+ "$COMFY_DIR/models/clip/t5xxl_fp8_e4m3fn.safetensors" \
165
+ "T5-XXL FP8"
166
+
167
+ dl "https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/ae.safetensors" \
168
+ "$COMFY_DIR/models/vae/ae.safetensors" \
169
+ "FLUX.1 VAE"
170
+
171
+ dl "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors" \
172
+ "$COMFY_DIR/models/vae/flux2-vae.safetensors" \
173
+ "FLUX.2 VAE"
174
+
175
+ # ═══════════════════════════════════════════════════════════════════════════════
176
+ # LORAS (from mirror)
177
+ # ═══════════════════════════════════════════════════════════════════════════════
178
+ echo -e "\n${YELLOW}[4/7] LoRAs...${NC}"
179
+
180
+ echo -e "${MAGENTA}═══ Flux.1 Dev LoRAs ═══${NC}"
181
+ for lora in flux1dev_nudity_female_v2 flux1dev_anatomy_female flux1dev_nipple_default flux1dev_pussy_default; do
182
+ dl "$MIRROR/loras/flux1dev/${lora}.safetensors" \
183
+ "$COMFY_DIR/models/loras/${lora}.safetensors" \
184
+ "$lora"
185
+ done
186
+
187
+ echo -e "\n${MAGENTA}═══ Flux.2 Klein LoRAs ═══${NC}"
188
+ for lora in flux2klein_nsfw flux2klein_nipple flux2klein_pussy flux2klein_body_version_a flux2klein_style_2000s; do
189
+ dl "$MIRROR/loras/flux2klein/${lora}.safetensors" \
190
+ "$COMFY_DIR/models/loras/${lora}.safetensors" \
191
+ "$lora"
192
+ done
193
+
194
+ echo -e "\n${MAGENTA}═══ Kontext LoRAs ═══${NC}"
195
+ dl "$MIRROR/loras/kontext/clothes_remover_v0.safetensors" \
196
+ "$COMFY_DIR/models/loras/clothes_remover_v0.safetensors" \
197
+ "Clothes Remover v0"
198
+
199
+ # ═════════════════���═════════════════════════════════════════════════════════════
200
+ # REACTOR & DETECTORS (from mirror)
201
+ # ═══════════════════════════════════════════════════════════════════════════════
202
+ echo -e "\n${YELLOW}[5/7] ReActor & Detectors...${NC}"
203
+
204
+ echo -e "${MAGENTA}═══ Face Swap ═══${NC}"
205
+ dl "$MIRROR/swappers/reswapper_128.onnx" \
206
+ "$COMFY_DIR/models/insightface/inswapper_128.onnx" \
207
+ "Inswapper 128"
208
+
209
+ dl "$MIRROR/facerestore/GFPGANv1.4.pth" \
210
+ "$COMFY_DIR/models/facerestore_models/GFPGANv1.4.pth" \
211
+ "GFPGAN v1.4"
212
+
213
+ dl "$MIRROR/facerestore/codeformer.pth" \
214
+ "$COMFY_DIR/models/facerestore_models/codeformer.pth" \
215
+ "CodeFormer"
216
+
217
+ echo -e "\n${MAGENTA}═══ InsightFace buffalo_l ═══${NC}"
218
+ for f in 1k3d68.onnx 2d106det.onnx det_10g.onnx genderage.onnx w600k_r50.onnx; do
219
+ dl "$MIRROR/insightface/buffalo_l/$f" \
220
+ "$COMFY_DIR/models/insightface/models/buffalo_l/$f" \
221
+ "buffalo_l/$f"
222
+ done
223
+
224
+ echo -e "\n${MAGENTA}═══ Detectors ═══${NC}"
225
+ dl "$MIRROR/detection/face_yolov8m.pt" \
226
+ "$COMFY_DIR/models/ultralytics/bbox/face_yolov8m.pt" \
227
+ "Face YOLOv8m"
228
+
229
+ dl "$MIRROR/detection/hand_yolov8s.pt" \
230
+ "$COMFY_DIR/models/ultralytics/bbox/hand_yolov8s.pt" \
231
+ "Hand YOLOv8s"
232
+
233
+ dl "$MIRROR/detection/person_yolov8s-seg.pt" \
234
+ "$COMFY_DIR/models/ultralytics/segm/person_yolov8s-seg.pt" \
235
+ "Person YOLOv8s-seg"
236
+
237
+ dl "$MIRROR/detection/sam_vit_l_0b3195.pth" \
238
+ "$COMFY_DIR/models/sams/sam_vit_l_0b3195.pth" \
239
+ "SAM ViT-L"
240
+
241
+ echo -e "\n${MAGENTA}═══ Upscaler ═══${NC}"
242
+ dl "$MIRROR/upscalers/4x_NMKD-Siax_200k.pth" \
243
+ "$COMFY_DIR/models/upscale_models/4x_NMKD-Siax_200k.pth" \
244
+ "4x NMKD-Siax"
245
+
246
+ # ═══════════════════════════════════════════════════════════════════════════════
247
+ # WORKFLOW
248
+ # ═══════════════════════════════════════════════════════════════════════════════
249
+ echo -e "\n${YELLOW}[6/7] Workflow...${NC}"
250
+ dl "https://huggingface.co/msrcam/ComfyUI_AutoInstallers/resolve/main/installers/nudify/Flux_Ultimate_Nudify_v1.14.json" \
251
+ "$COMFY_DIR/user/default/workflows/Flux_Ultimate_Nudify.json" \
252
+ "Workflow v1.14"
253
+
254
+ # ═══════════════════════════════════════════════════════════════════════════════
255
+ # SYMLINKS for Impact Pack paths
256
+ # ═══════════════════════════════════════════════════════════════════════════════
257
+ echo -e "\n${YELLOW}[7/7] Creating symlinks...${NC}"
258
+ cd "$COMFY_DIR/models"
259
+
260
+ # SAM
261
+ [ ! -L "sams/sam_vit_l_0b3195.pth" ] && [ -f "sams/sam_vit_l_0b3195.pth" ] || true
262
+
263
+ # Ultralytics expects specific paths
264
+ ln -sf "$COMFY_DIR/models/ultralytics/bbox/face_yolov8m.pt" "$COMFY_DIR/models/ultralytics/face_yolov8m.pt" 2>/dev/null || true
265
+ ln -sf "$COMFY_DIR/models/ultralytics/bbox/hand_yolov8s.pt" "$COMFY_DIR/models/ultralytics/hand_yolov8s.pt" 2>/dev/null || true
266
+
267
+ echo -e "${GREEN}βœ“ Symlinks created${NC}"
268
+
269
+ # ═══════════════════════════════════════════════════════════════════════════════
270
+ # DONE
271
+ # ═══════════════════════════════════════════════════════════════════════════════
272
+ echo -e "\n${GREEN}═══════════════════════════════════════════════════════════════════════════════${NC}"
273
+ echo -e "${GREEN} βœ“ FLUX Ultimate Nudify v0.25 - Complete!${NC}"
274
+ echo -e "${GREEN}═══════════════════════════════════════════════════════════════════════════════${NC}"
275
+
276
+ echo -e "\n${CYAN}Start ComfyUI:${NC}"
277
+ echo " cd $COMFY_DIR && python main.py --listen 0.0.0.0 --port 8188"
278
+ echo ""