File size: 14,190 Bytes
290d8b0
 
 
97d886a
290d8b0
97d886a
290d8b0
 
97d886a
290d8b0
97d886a
 
290d8b0
97d886a
290d8b0
97d886a
 
 
 
 
 
290d8b0
 
 
 
97d886a
7275dd9
97d886a
 
 
 
290d8b0
 
97d886a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290d8b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7591c2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290d8b0
 
cff85af
290d8b0
 
 
97d886a
 
 
 
 
290d8b0
 
cff85af
290d8b0
97d886a
 
290d8b0
97d886a
 
290d8b0
97d886a
 
290d8b0
97d886a
 
 
 
 
 
290d8b0
 
97d886a
 
 
 
 
 
 
 
290d8b0
 
 
 
97d886a
290d8b0
 
97d886a
 
290d8b0
 
 
97d886a
 
 
 
 
290d8b0
 
 
97d886a
 
290d8b0
97d886a
 
290d8b0
97d886a
 
290d8b0
97d886a
 
 
 
 
 
290d8b0
 
97d886a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e563936
993c3ec
e563936
 
97d886a
 
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
@echo off
setlocal enabledelayedexpansion

set "basePath=%CD%"

if not exist "%basePath%\logs" mkdir "%basePath%\logs"

:check_folder
if exist "%basePath%\ComfyUI" (
    echo ComfyUI folder detected
	set "modelsPath=%basePath%\ComfyUI\models"
) else if exist "%basePath%\ComfyUI_windows_portable" (
    echo ComfyUI folder detected
	set "modelsPath=%basePath%\ComfyUI_windows_portable\ComfyUI\models"
) else (
	echo ComfyUI folder not detected, give ComfyUI folder path:
    set /p "comfyPath=Path: "
    set "modelsPath=!comfyPath!\models"
    echo comfyPath = !comfyPath!
    echo modelsPath = !modelsPath!
    pause
)

:CHOOSE_OPTION
REM Ask user for installation type
echo Do you want to download FLUX base models?
echo A) Base
echo B) fp8
echo C) All
echo D) No
set /p "CHOICE=Enter your choice (A,B,C or D) and press Enter: "


:CHOOSE_FLUX_GGUF
REM Ask user if they FLUXt to download FLUX GGUF Model
echo Do you FLUXt 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,B,C,D or E.
	goto CHOOSE_FLUX_GGUF
)

: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_CONTROLNET
REM Ask user if they want to download FLUX SCHNELL Model
echo Do you want to download FLUX ControlNet 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
)

if /i "%CHOICE%"=="A" (
    echo Downloading unet models file...
	curl -L -o "%modelsPath%/unet/flux1-dev.sft" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/flux1-dev.sft?download=true
) else if /i "%CHOICE%"=="B" (
    echo Downloading unet models file...
	curl -L -o "%modelsPath%/unet/flux1-dev-fp8.safetensors" https://huggingface.co/Kijai/flux-fp8/resolve/main/flux1-dev-fp8.safetensors?download=true
) else if /i "%CHOICE%"=="C" (
    echo Downloading unet models file...
	curl -L -o "%modelsPath%/unet/flux1-dev.sft" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/flux1-dev.sft?download=true
    curl -L -o "%modelsPath%/unet/flux1-dev-fp8.safetensors" https://huggingface.co/Kijai/flux-fp8/resolve/main/flux1-dev-fp8.safetensors?download=true
) else if /i "%CHOICE%"=="D" (
    set "INSTALL_TYPE=optimized"
) else (
echo Invalid choice. Please enter A,B,C or D.
    goto CHOOSE_OPTION
)

REM Download VAE file
echo Downloading VAE file...
curl -L -o "%modelsPath%/vae/ae.safetensors" "https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/ae.safetensors?download=true"

REM Download CLIP files
echo Downloading CLIP files...
curl -L -o "%modelsPath%/clip/clip_l.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/clip_l.safetensors?download=true
curl -L -o "%modelsPath%/clip/longclip-L.pt" https://huggingface.co/BeichenZhang/LongCLIP-L/blob/main/longclip-L.pt?download=true
curl -L -o "%modelsPath%/clip/t5xxl_fp8_e4m3fn.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/t5xxl_fp8_e4m3fn.safetensors?download=true
curl -L -o "%modelsPath%/clip/t5xxl_fp16.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/t5xxl_fp16.safetensors?download=true
curl -L -o "%modelsPath%/clip/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 Quant Model...
    if /i "%FLUX_GGUF_CHOICE%"=="A" (
	curl -L -o "%modelsPath%/clip/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 "%modelsPath%/unet/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 "%modelsPath%/clip/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 "%modelsPath%/unet/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 "%modelsPath%/clip/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
	curl -L -o "%modelsPath%/unet/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 "%modelsPath%/clip/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 "%modelsPath%/clip/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 "%modelsPath%/clip/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
	curl -L -o "%modelsPath%/unet/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 "%modelsPath%/unet/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 "%modelsPath%/unet/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 clip vision
echo Downloading clip vision file...
curl -L -o "%modelsPath%/clip_vision/clip_vision_h.safetensors" https://huggingface.co/Comfy-Org/FLUX_2.1_ComfyUI_repackaged/resolve/main/split_files/clip_vision/clip_vision_h.safetensors?download=true

REM Download upscale model
echo Downloading upscale models...
curl -L -o "%modelsPath%/upscale_models/RealESRGAN_x4plus.pth" https://huggingface.co/spaces/Marne/Real-ESRGAN/resolve/main/RealESRGAN_x4plus.pth?download=true
curl -L -o "%modelsPath%/upscale_models/RealESRGAN_x4plus_anime_6B.pth" https://huggingface.co/spaces/Marne/Real-ESRGAN/resolve/main/RealESRGAN_x4plus_anime_6B.pth?download=true

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

mkdir "%modelsPath%/LLM"
mkdir "%modelsPath%/xlabs/controlnets"

if "%DOWNLOAD_FLUX_CONTROLNET%"=="yes" (
    echo Downloading FLUX ControlNet Models...
    curl -L -o "%modelsPath%/xlabs/controlnets/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 "%modelsPath%/xlabs/controlnets/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 "%modelsPath%/xlabs/controlnets/flux-hed-controlnet-v3.safetensors" https://huggingface.co/XLabs-AI/flux-controlnet-hed-v3/resolve/main/flux-hed-controlnet-v3.safetensors?download=true
	curl -L -o "%modelsPath%/unet/flux1-depth-dev-fp8.safetensors" https://huggingface.co/boricuapab/flux1-depth-dev-fp8/resolve/main/flux1-depth-dev-fp8.safetensors?download=true
	curl -L -o "%modelsPath%/unet/flux1-canny-dev-fp8.safetensors" https://huggingface.co/boricuapab/flux1-canny-dev-fp8/resolve/main/flux1-canny-dev-fp8.safetensors?download=true
	if "%DOWNLOAD_GGUF%"=="yes" (
		echo Downloading ControlNet GGUF Model...
		if /i "%FLUX_GGUF_CHOICE%"=="A" (
		curl -L -o "%modelsPath%/unet/flux1-depth-dev-fp16-Q8_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Depth-dev-GGUF/resolve/main/flux1-depth-dev-fp16-Q8_0-GGUF.gguf?download=true
		curl -L -o "%modelsPath%/unet/flux1-canny-dev-fp16-Q8_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Canny-dev-GGUF/resolve/main/flux1-canny-dev-fp16-Q8_0-GGUF.gguf?download=true
		) else if /i "%FLUX_GGUF_CHOICE%"=="B" (
		curl -L -o "%modelsPath%/unet/flux1-depth-dev-fp16-Q5_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Depth-dev-GGUF/resolve/main/flux1-depth-dev-fp16-Q5_0-GGUF.gguf?download=true
		curl -L -o "%modelsPath%/unet/flux1-canny-dev-fp16-Q5_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Canny-dev-GGUF/resolve/main/flux1-canny-dev-fp16-Q5_0-GGUF.gguf?download=true
		) else if /i "%FLUX_GGUF_CHOICE%"=="C" (
		curl -L -o "%modelsPath%/unet/flux1-depth-dev-fp16-Q4_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Depth-dev-GGUF/resolve/main/flux1-depth-dev-fp16-Q4_0-GGUF.gguf?download=true
		curl -L -o "%modelsPath%/unet/flux1-canny-dev-fp16-Q4_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Canny-dev-GGUF/resolve/main/flux1-canny-dev-fp16-Q4_0-GGUF.gguf?download=true
		) else if /i "%FLUX_GGUF_CHOICE%"=="D" (
		curl -L -o "%modelsPath%/unet/flux1-depth-dev-fp16-Q8_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Depth-dev-GGUF/resolve/main/flux1-depth-dev-fp16-Q8_0-GGUF.gguf?download=true
		curl -L -o "%modelsPath%/unet/flux1-depth-dev-fp16-Q5_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Depth-dev-GGUF/resolve/main/flux1-depth-dev-fp16-Q5_0-GGUF.gguf?download=true
		curl -L -o "%modelsPath%/unet/flux1-depth-dev-fp16-Q4_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Depth-dev-GGUF/resolve/main/flux1-depth-dev-fp16-Q4_0-GGUF.gguf?download=true
		curl -L -o "%modelsPath%/unet/flux1-canny-dev-fp16-Q8_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Canny-dev-GGUF/resolve/main/flux1-canny-dev-fp16-Q8_0-GGUF.gguf?download=true
		curl -L -o "%modelsPath%/unet/flux1-canny-dev-fp16-Q5_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Canny-dev-GGUF/resolve/main/flux1-canny-dev-fp16-Q5_0-GGUF.gguf?download=true
		curl -L -o "%modelsPath%/unet/flux1-canny-dev-fp16-Q4_0-GGUF.gguf" https://huggingface.co/SporkySporkness/FLUX.1-Canny-dev-GGUF/resolve/main/flux1-canny-dev-fp16-Q4_0-GGUF.gguf?download=true
		)
	)
	curl -L -o "%modelsPath%/controlnet/diffusion_pytorch_model_promax.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/controlnet/diffusion_pytorch_model_promax.safetensors?download=true
	curl -L -o "%modelsPath%/controlnet/Shakker-LabsFLUX1-dev-ControlNet-Union-Pro.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/controlnet/Shakker-LabsFLUX1-dev-ControlNet-Union-Pro.safetensors?download=true
)

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

echo Downloading FLUX PuLID...
mkdir "%modelsPath%/pulid"
curl -L -o "%modelsPath%/pulid/pulid_flux_v0.9.0.safetensors" https://huggingface.co/camenduru/PuLID/resolve/main/pulid_flux_v0.9.0.safetensors?download=true

echo Models downloaded.
pause