File size: 19,228 Bytes
aff16f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524912d
 
aff16f3
 
 
 
 
 
 
b124253
 
 
 
aff16f3
b124253
 
524912d
 
b124253
524912d
 
b124253
 
 
 
aff16f3
 
b124253
524912d
 
 
 
b124253
524912d
 
 
b124253
 
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
 
b124253
524912d
 
b124253
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
 
b124253
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
 
b124253
524912d
b124253
 
524912d
 
b124253
524912d
 
 
 
 
b124253
524912d
 
 
 
 
 
b124253
 
524912d
 
b124253
524912d
 
 
 
b124253
 
524912d
b124253
 
524912d
 
 
b124253
 
524912d
b124253
aff16f3
 
 
 
 
 
 
 
 
 
 
 
 
 
524912d
 
 
 
aff16f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524912d
aff16f3
524912d
aff16f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524912d
aff16f3
 
 
 
 
 
 
 
 
 
 
 
b124253
 
aff16f3
 
 
 
 
 
 
 
 
 
 
 
b124253
aff16f3
 
 
 
 
 
 
 
 
 
 
 
 
 
524912d
aff16f3
 
 
524912d
 
 
aff16f3
 
b124253
 
 
 
 
 
524912d
 
 
b124253
 
aff16f3
 
 
 
524912d
aff16f3
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
@echo off
setlocal enabledelayedexpansion

:CHOOSE_OPTION
REM Ask user for installation type
echo Choose your preferred installation:
echo A) Fast-Lowvram install
echo B) Unoptimized normal model
set /p "CHOICE=Enter your choice (A or B) and press Enter: "

if /i "%CHOICE%"=="A" (
    set "INSTALL_TYPE=fast-lowvram"
) else if /i "%CHOICE%"=="B" (
    set "INSTALL_TYPE=unoptimized"
) else (
echo Invalid choice. Please enter A or B.
    goto CHOOSE_OPTION
)

:CHOOSE_FLUX_SCHNELL
REM Ask user if they want to download FLUX SCHNELL Model
echo Do you want to download the FLUX SCHNELL Model?
echo A) Yes
echo B) No
set /p "FLUX_SCHNELL_CHOICE=Enter your choice (A or B) and press Enter: "

if /i "%FLUX_SCHNELL_CHOICE%"=="A" (
    set "DOWNLOAD_FLUX_SCHNELL=yes"
) else if /i "%FLUX_SCHNELL_CHOICE%"=="B" (
    set "DOWNLOAD_FLUX_SCHNELL=no"
) else (
echo Invalid choice. Please enter A or B.
    goto CHOOSE_FLUX_SCHNELL
)

:CHOOSE_FLUX_GGUF
REM Ask user if they want to download FLUX GGUF Model
echo Do you want to download FLUX GGUF Models?
echo A) Q8_0 + T5_Q8 (24GB Vram)
echo B) Q5_K_S + T5_Q5_K_M (16GB Vram)
echo C) Q4_K_S + T5_Q3_K_L (less than 12GB Vram)
echo D) All
echo E) No
set /p "FLUX_GGUF_CHOICE=Enter your choice (A,B,C,D or E) and press Enter: "

if /i "%FLUX_GGUF_CHOICE%"=="A" (
    set "DOWNLOAD_GGUF=yes"
) else if /i "%FLUX_GGUF_CHOICE%"=="B" (
    set "DOWNLOAD_GGUF=yes"
) else if /i "%FLUX_GGUF_CHOICE%"=="C" (
    set "DOWNLOAD_GGUF=yes"
) else if /i "%FLUX_GGUF_CHOICE%"=="D" (
    set "DOWNLOAD_GGUF=yes"
) else if /i "%FLUX_GGUF_CHOICE%"=="E" (
    set "DOWNLOAD_GGUF=no"
) else (
echo Invalid choice. Please enter A or B.
    goto CHOOSE_FLUX_GGUF
)

:CHOOSE_FLUX_CONTROLNET
REM Ask user if they want to download FLUX SCHNELL Model
echo Do you want to download ControlNet V3 Models?
echo A) Yes
echo B) No
set /p "FLUX_CONTROLNET_CHOICE=Enter your choice (A or B) and press Enter: "

if /i "%FLUX_CONTROLNET_CHOICE%"=="A" (
    set "DOWNLOAD_FLUX_CONTROLNET=yes"
) else if /i "%FLUX_CONTROLNET_CHOICE%"=="B" (
    set "DOWNLOAD_FLUX_CONTROLNET=no"
) else (
echo Invalid choice. Please enter A or B.
    goto CHOOSE_FLUX_CONTROLNET
)

:CHOOSE_FLUX_LORA
REM Ask user if they want to download FLUX LORA
echo Do you want to download UmeAiRT LoRAs?
echo A) Yes
echo B) No
set /p "FLUX_LORA_CHOICE=Enter your choice (A or B) and press Enter: "

if /i "%FLUX_LORA_CHOICE%"=="A" (
    set "DOWNLOAD_FLUX_LORA=yes"
) else if /i "%FLUX_LORA_CHOICE%"=="B" (
    set "DOWNLOAD_FLUX_LORA=no"
) else (
echo Invalid choice. Please enter A or B.
    goto CHOOSE_FLUX_LORA
)

REM Check if 7-Zip is installed and get its path
for %%I in (7z.exe) do set "SEVEN_ZIP_PATH=%%~$PATH:I"
if not defined SEVEN_ZIP_PATH (
    if exist "%ProgramFiles%\7-Zip\7z.exe" (
        set "SEVEN_ZIP_PATH=%ProgramFiles%\7-Zip\7z.exe"
    ) else if exist "%ProgramFiles(x86)%\7-Zip\7z.exe" (
        set "SEVEN_ZIP_PATH=%ProgramFiles(x86)%\7-Zip\7z.exe"
    ) else (
        echo 7-Zip is not installed. Downloading and installing...
        curl -L -o 7z-installer.exe https://www.7-zip.org/a/7z2201-x64.exe
        7z-installer.exe /S
        set "SEVEN_ZIP_PATH=%ProgramFiles%\7-Zip\7z.exe"
        if not exist "%SEVEN_ZIP_PATH%" (
            echo Installation of 7-Zip failed. Please install it manually and try again.
            exit /b 1
        )
        del 7z-installer.exe
    )
)

REM Check and install Git
git --version > NUL 2>&1
if %errorlevel% NEQ 0 (
    echo Installing Git...
    powershell -Command "& {Invoke-WebRequest -Uri 'https://github.com/git-for-windows/git/releases/download/v2.41.0.windows.3/Git-2.41.0.3-64-bit.exe' -OutFile 'Git-2.41.0.3-64-bit.exe'; if ($LASTEXITCODE -ne 0) { exit 1 }}"
    if %errorlevel% NEQ 0 (
        echo Failed to download Git installer.
        exit /b
    )
    start /wait Git-2.41.0.3-64-bit.exe /VERYSILENT
    del Git-2.41.0.3-64-bit.exe
) else (
    echo Git already installed.
)

REM Download ComfyUI
echo Downloading ComfyUI...
curl -L -o ComfyUI_windows_portable_nvidia_cu121_or_cpu.7z https://github.com/comfyanonymous/ComfyUI/releases/download/latest/ComfyUI_windows_portable_nvidia_cu121_or_cpu.7z

REM Extract ComfyUI
echo Extracting ComfyUI...
"%SEVEN_ZIP_PATH%" x ComfyUI_windows_portable_nvidia_cu121_or_cpu.7z -o"%CD%" -y  >nul 2>&1

REM Check if extraction was successful
if not exist "ComfyUI_windows_portable" (
    echo Extraction failed. Please check the downloaded file and try again.
    exit /b 1
)

REM Delete archive
del /f ComfyUI_windows_portable_nvidia_cu121_or_cpu.7z -force


REM Navigate to custom_nodes folder
REM Update ComfyUI
cd ComfyUI_windows_portable\update
..\python_embeded\python.exe -m pip install --upgrade pip >nul 2>&1
..\python_embeded\python.exe .\update.py ..\ComfyUI\ >nul 2>&1
if exist update_new.py (
  move /y update_new.py update.py  >nul 2>&1
  ..\python_embeded\python.exe .\update.py ..\ComfyUI\ --skip_self_update >nul 2>&1
)

cd ..
cd ComfyUI\custom_nodes

REM Clone ComfyUI-Manager
echo Installing ComfyUI-Manager...
git clone https://github.com/ltdrdata/ComfyUI-Manager.git >nul 2>&1
echo Installing additional nodes...
echo   - Impact-Pack
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack >nul 2>&1
cd ComfyUI-Impact-Pack
git clone https://github.com/ltdrdata/ComfyUI-Impact-Subpack impact_subpack >nul 2>&1
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
..\..\..\python_embeded\python.exe -s -m pip install ultralytics --no-warn-script-location >nul 2>&1
cd ..

echo   - Controlnet-aux
git clone https://github.com/Fannovel16/comfyui_controlnet_aux >nul 2>&1
cd comfyui_controlnet_aux
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - WAS-Suite
git clone https://github.com/WASasquatch/was-node-suite-comfyui >nul 2>&1
cd was-node-suite-comfyui
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - GGUF
git clone https://github.com/city96/ComfyUI-GGUF >nul 2>&1
cd ComfyUI-GGUF
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - Custom-Scripts
git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts >nul 2>&1

echo   - UltimateSDUpscale
git clone https://github.com/ssitu/ComfyUI_UltimateSDUpscale --recursive >nul 2>&1

echo   - Various
git clone https://github.com/jamesWalker55/comfyui-various >nul 2>&1

echo   - rgthree
git clone https://github.com/rgthree/rgthree-comfy >nul 2>&1
cd rgthree-comfy
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - Florence2
git clone https://github.com/kijai/ComfyUI-Florence2 >nul 2>&1
cd ComfyUI-Florence2
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - Inpaint-CropAndStitch
git clone https://github.com/lquesada/ComfyUI-Inpaint-CropAndStitch >nul 2>&1

echo   - Universal-Styler
git clone https://github.com/KoreTeknology/ComfyUI-Universal-Styler >nul 2>&1

echo   - Tensorops
git clone https://github.com/un-seen/comfyui-tensorops >nul 2>&1
cd comfyui-tensorops
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - X-Flux
git clone https://github.com/XLabs-AI/x-flux-comfyui >nul 2>&1
cd x-flux-comfyui
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - Efficiency Nodes
git clone https://github.com/jags111/efficiency-nodes-comfyui >nul 2>&1
cd efficiency-nodes-comfyui
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - Comfyroll
git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes >nul 2>&1

echo   - Art-venture
git clone https://github.com/sipherxyz/comfyui-art-venture >nul 2>&1
cd comfyui-art-venture
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - Dream-project
git clone https://github.com/alt-key-project/comfyui-dream-project >nul 2>&1
cd comfyui-dream-project
..\..\..\python_embeded\python.exe -s -m pip install imageio pilgram scipy numpy==1.24.4 torchvision evalidate --no-warn-script-location >nul 2>&1
cd ..

echo   - KJNodes
git clone https://github.com/kijai/ComfyUI-KJNodes >nul 2>&1
cd ComfyUI-KJNodes
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - Lora-Auto-Trigger-Words
git clone https://github.com/idrirap/ComfyUI-Lora-Auto-Trigger-Words >nul 2>&1

echo   - Easy-Use
git clone https://github.com/yolain/ComfyUI-Easy-Use >nul 2>&1
cd ComfyUI-Easy-Use
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - mxToolkit
git clone https://github.com/Smirnov75/ComfyUI-mxToolkit >nul 2>&1

echo   - RvTools
git clone https://github.com/Rvage0815/ComfyUI-RvTools >nul 2>&1
cd ComfyUI-RvTools
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - Zssentials
git clone https://github.com/cubiq/ComfyUI_essentials >nul 2>&1
cd ComfyUI_essentials
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - ModdedNodes
git clone https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes >nul 2>&1

echo   - LayerStyle
git clone https://github.com/chflame163/ComfyUI_LayerStyle >nul 2>&1
cd ComfyUI_LayerStyle
..\..\..\python_embeded\python.exe -s -m pip install .\whl\docopt-0.6.2-py2.py3-none-any.whl --no-warn-script-location >nul 2>&1
..\..\..\python_embeded\python.exe -s -m pip install .\whl\hydra_core-1.3.2-py3-none-any.whl --no-warn-script-location >nul 2>&1
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location >nul 2>&1
cd ..

echo   - PulID
git clone https://github.com/sipie800/ComfyUI-PuLID-Flux-Enhanced >nul 2>&1
cd ..\..\python_embeded
curl -L -o "insightface-0.7.3-cp311-cp311-win_amd64.whl" https://github.com/Gourieff/Assets/raw/main/Insightface/insightface-0.7.3-cp311-cp311-win_amd64.whl  >nul 2>&1
.\python.exe -m pip install --use-pep517 facexlib  >nul 2>&1
.\python.exe -m pip install git+https://github.com/rodjjo/filterpy.git  >nul 2>&1
.\python.exe -m pip install onnxruntime==1.19.2 onnxruntime-gpu==1.15.1 insightface-0.7.3-cp311-cp311-win_amd64.whl  >nul 2>&1
cd ..
cd ComfyUI\custom_nodes\ComfyUI-PuLID-Flux-Enhanced
..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt --no-warn-script-location  >nul 2>&1
cd ..\..
cd models
curl -L -o "insightface.7z" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/insightface.7z?download=true >nul 2>&1
"%SEVEN_ZIP_PATH%" x insightface.7z -o"%CD%" -y >nul 2>&1
del /f insightface.7z -force >nul 2>&1
mkdir pulid
cd pulid
curl -L -o "pulid_flux_v0.9.0.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/pulid/pulid_flux_v0.9.0.safetensors?download=true >nul 2>&1
cd ..

REM Navigate to models folder
cd ..\models

REM Download VAE file
echo Downloading VAE file...
cd vae
curl -L -o ae.safetensors https://huggingface.co/UmeAiRT/FLUX-auto_installer/resolve/main/ae.safetensors?download=true

cd ..

REM Download CLIP files
echo Downloading CLIP files...
cd clip
curl -L -o "clip_l.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/clip_l.safetensors?download=true
curl -L -o "t5xxl_fp8_e4m3fn.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/t5xxl_fp8_e4m3fn.safetensors?download=true
curl -L -o "t5xxl_fp16.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/t5xxl_fp16.safetensors?download=true
curl -L -o "ViT-L-14-TEXT-detail-improved-hiT-GmP-TE-only-HF.safetensors" https://huggingface.co/zer0int/CLIP-GmP-ViT-L-14/resolve/main/ViT-L-14-TEXT-detail-improved-hiT-GmP-TE-only-HF.safetensors?download=true

if "%DOWNLOAD_GGUF%"=="yes" (
    echo Downloading FLUX GGUF encoder Model...
    if /i "%FLUX_GGUF_CHOICE%"=="A" (
	curl -L -o t5-v1_1-xxl-encoder-Q8_0.gguf https://huggingface.co/city96/t5-v1_1-xxl-encoder-gguf/resolve/main/t5-v1_1-xxl-encoder-Q8_0.gguf?download=true
	) else if /i "%FLUX_GGUF_CHOICE%"=="B" (
	curl -L -o t5-v1_1-xxl-encoder-Q5_K_M.gguf https://huggingface.co/city96/t5-v1_1-xxl-encoder-gguf/resolve/main/t5-v1_1-xxl-encoder-Q5_K_M.gguf?download=true
	) else if /i "%FLUX_GGUF_CHOICE%"=="C" (
	curl -L -o t5-v1_1-xxl-encoder-Q3_K_L.gguf https://huggingface.co/city96/t5-v1_1-xxl-encoder-gguf/resolve/main/t5-v1_1-xxl-encoder-Q3_K_L.gguf?download=true
	) else if /i "%FLUX_GGUF_CHOICE%"=="D" (
	curl -L -o t5-v1_1-xxl-encoder-Q8_0.gguf https://huggingface.co/city96/t5-v1_1-xxl-encoder-gguf/resolve/main/t5-v1_1-xxl-encoder-Q8_0.gguf?download=true
	curl -L -o t5-v1_1-xxl-encoder-Q5_K_M.gguf https://huggingface.co/city96/t5-v1_1-xxl-encoder-gguf/resolve/main/t5-v1_1-xxl-encoder-Q5_K_M.gguf?download=true
	curl -L -o t5-v1_1-xxl-encoder-Q3_K_L.gguf https://huggingface.co/city96/t5-v1_1-xxl-encoder-gguf/resolve/main/t5-v1_1-xxl-encoder-Q3_K_L.gguf?download=true
	)
)
cd ..

REM Download UNET file based on user choice
echo Downloading UNET file...
cd unet
if "%INSTALL_TYPE%"=="fast-lowvram" (
    curl -L -o flux1-dev-fp8.safetensors https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/flux1-dev-fp8.safetensors?download=true
) else (
    curl -L -o flux1-dev.sft https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/flux1-dev.sft?download=true
)

if "%DOWNLOAD_GGUF%"=="yes" (
    echo Downloading FLUX GGUF Model...
    if /i "%FLUX_GGUF_CHOICE%"=="A" (
	curl -L -o flux1-dev-Q8_0.gguf https://huggingface.co/city96/FLUX.1-dev-gguf/resolve/main/flux1-dev-Q8_0.gguf?download=true
	) else if /i "%FLUX_GGUF_CHOICE%"=="B" (
	curl -L -o flux1-dev-Q5_K_S.gguf https://huggingface.co/city96/FLUX.1-dev-gguf/resolve/main/flux1-dev-Q5_K_S.gguf?download=true
	) else if /i "%FLUX_GGUF_CHOICE%"=="C" (
	curl -L -o flux1-dev-Q4_K_S.gguf https://huggingface.co/city96/FLUX.1-dev-gguf/resolve/main/flux1-dev-Q4_K_S.gguf?download=true
	) else if /i "%FLUX_GGUF_CHOICE%"=="D" (
	curl -L -o flux1-dev-Q8_0.gguf https://huggingface.co/city96/FLUX.1-dev-gguf/resolve/main/flux1-dev-Q8_0.gguf?download=true
	curl -L -o flux1-dev-Q5_K_S.gguf https://huggingface.co/city96/FLUX.1-dev-gguf/resolve/main/flux1-dev-Q5_K_S.gguf?download=true
	curl -L -o flux1-dev-Q4_K_S.gguf https://huggingface.co/city96/FLUX.1-dev-gguf/resolve/main/flux1-dev-Q4_K_S.gguf?download=true
	)
)

REM Download FLUX SCHNELL Model if user chose to
if "%DOWNLOAD_FLUX_SCHNELL%"=="yes" (
    echo Downloading FLUX SCHNELL Model...
    curl -L -o flux1-schnell-fp8.safetensors https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/flux1-schnell-fp8.safetensors?download=true
)

cd ..

cd loras
REM Download FLUX SCHNELL Model if user chose to
if "%DOWNLOAD_FLUX_LORA%"=="yes" (
    echo Downloading UmeAiRT LoRAs...
    curl -L -o ume_sky_v2.safetensors https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Ume_Sky/resolve/main/ume_sky_v2.safetensors?download=true
    curl -L -o ume_modern_pixelart.safetensors https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Modern_Pixel_art/resolve/main/ume_modern_pixelart.safetensors?download=true
    curl -L -o ume_classic_Romanticism.safetensors https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Romanticism/resolve/main/ume_classic_Romanticism.safetensors?download=true
    curl -L -o ume_classic_impressionist.safetensors https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Impressionism/resolve/main/ume_classic_impressionist.safetensors?download=true
    curl -L -o ume_the-little-newspaper.safetensors https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Ume_J1900/resolve/main/umej1900.safetensors?download=true
    curl -L -o ume_knight.safetensors https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Ume_Knight/resolve/main/ume_gachaak.safetensors?download=true
)

cd ..

REM Download upscale model
echo Downloading upscale models...
cd upscale_models
curl -L -o 4x_NMKD-Siax_200k.pth https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/4x_NMKD-Siax_200k.pth?download=true
curl -L -o 4x-ClearRealityV1.pth https://huggingface.co/skbhadra/ClearRealityV1/resolve/main/4x-ClearRealityV1.pth?download=true

cd ..

mkdir LLM
mkdir .\xlabs\controlnets
cd xlabs\controlnets
REM Download FLUX ControlNet Models if user chose to
if "%DOWNLOAD_FLUX_CONTROLNET%"=="yes" (
    echo Downloading FLUX ControlNet Models...
    curl -L -o flux-canny-controlnet-v3.safetensors https://huggingface.co/XLabs-AI/flux-controlnet-canny-v3/resolve/main/flux-canny-controlnet-v3.safetensors?download=true
    curl -L -o flux-depth-controlnet-v3.safetensors https://huggingface.co/XLabs-AI/flux-controlnet-depth-v3/resolve/main/flux-depth-controlnet-v3.safetensors?download=true
    curl -L -o flux-hed-controlnet-v3.safetensors https://huggingface.co/XLabs-AI/flux-controlnet-hed-v3/resolve/main/flux-hed-controlnet-v3.safetensors?download=true
)

cd ..\..\..
mkdir .\user\default
echo Downloading comfy settings...
cd user\default
curl -L -o comfy.settings.json https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/others/comfy.settings.json?download=true
echo Downloading comfy workflow...
mkdir .\workflows
cd workflows
curl -L -o "UmeAiRT - Flux workflow.7z" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/workflows/UmeAiRT-Flux_workflow.7z?download=true
"%SEVEN_ZIP_PATH%" x "UmeAiRT - Flux workflow.7z" -o"%CD%" -y   >nul 2>&1
del /f "UmeAiRT - Flux workflow.7z" -force   >nul 2>&1
cd ..\..\..\..

cd ComfyUI
cd custom_nodes
mkdir ComfyUI-NAI-styler
cd ComfyUI-NAI-styler
mkdir CSV
cd CSV
curl -L -o "naifilters.csv" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/others/naifilters.csv?download=true
curl -L -o "naistyles.csv" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/others/naistyles.csv?download=true
curl -L -o "naitypes.csv" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/others/naitypes.csv?download=true

cd ..\..\..\..

REM Final steps based on user choice
if "%INSTALL_TYPE%"=="fast-lowvram" (
    echo Downloading special run file for fast-lowvram...
    curl -L -o "run_nvidia_gpu-LOWVRAM.bat" "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/scripts/run_nvidia_gpu-LOWVRAM.bat?download=true"
    echo ComfyUI and FLUX installed. Running ComfyUI...
    call "run_nvidia_gpu-LOWVRAM.bat"
) else (
    echo ComfyUI and FLUX installed. HAVE FUN ;)
)