File size: 14,538 Bytes
7f18f05
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@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
)
powershell -NoProfile -Command "$p = Join-Path $env:modelsPath 'diffusion_models\FLUX'; if (-Not (Test-Path $p)) { New-Item -ItemType Directory -Path $p | Out-Null }"
powershell -NoProfile -Command "$p = Join-Path $env:modelsPath 'unet\FLUX'; if (-Not (Test-Path $p)) { New-Item -ItemType Directory -Path $p | Out-Null }"
powershell -NoProfile -Command "$p = Join-Path $env:modelsPath 'xlabs\controlnets'; if (-Not (Test-Path $p)) { New-Item -ItemType Directory -Path $p | Out-Null }"
powershell -NoProfile -Command "$p = Join-Path $env:modelsPath 'LLM'; if (-Not (Test-Path $p)) { New-Item -ItemType Directory -Path $p | Out-Null }"
REM Check if nvidia-smi is present
where nvidia-smi >nul 2>&1
if %errorlevel% neq 0 (
    echo No NVIDIA drivers detected.
    goto SKIP_NVIDIA
)

nvidia-smi --query-gpu=name,memory.total --format=csv > temp_gpu_info.txt
set "line="
for /f "skip=1 usebackq delims=" %%A in ("temp_gpu_info.txt") do (
    set "line=%%A"
    goto :process
)

:process
REM Extraire le nom et la mémoire
for /f "tokens=1,2 delims=," %%A in ("!line!") do (
    set "nvidia_name=%%A"
    set "nvidia_memory=%%B"
)

REM Calculer la mémoire en Go et arrondir
set /a nvidia_memory_mib=!nvidia_memory:~0,-4!
set /a nvidia_memory_go=(nvidia_memory_mib + 512) / 1024
rem set /a nvidia_memory_go=18
echo -------------------------------------------------------------------------------
echo Graphic card : !nvidia_name!                             VRAM : !nvidia_memory_go! Go 
echo -------------------------------------------------------------------------------
set /a "memory_go=nvidia_memory_go"
if !memory_go! GEQ 30 (
    set "version=FP16"
	echo Your best version is  FP16
	curl -L -o "%modelsPath%/diffusion_models/FLUX/flux1-dev-fp16.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/diffusion_models/FLUX/flux1-dev-fp16.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%/diffusion_models/FLUX/flux1-depth-dev-fp16.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/diffusion_models/FLUX/flux1-depth-dev-fp16.safetensors?download=true
	curl -L -o "%modelsPath%/diffusion_models/FLUX/flux1-canny-dev-fp16.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/diffusion_models/FLUX/flux1-canny-dev-fp16.safetensors?download=true
) else if !memory_go! GEQ 18 (
    set "version=FP8Q8"
	echo Your best version is  FP8/Q8
	curl -L -o "%modelsPath%/diffusion_models/FLUX/flux1-dev-fp8.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/diffusion_models/FLUX/flux1-dev-fp8.safetensors?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%/unet/FLUX/flux1-dev-Q8_0.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-dev-Q8_0.gguf?download=true
	curl -L -o "%modelsPath%/clip/t5-v1_1-xxl-encoder-Q8_0.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/t5-v1_1-xxl-encoder-Q8_0.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-depth-dev-fp16-Q8_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-depth-dev-fp16-Q8_0-GGUF.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-canny-dev-fp16-Q8_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-canny-dev-fp16-Q8_0-GGUF.gguf?download=true
	curl -L -o "%modelsPath%/diffusion_models/FLUX/flux1-depth-dev-fp8.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/diffusion_models/FLUX/flux1-depth-dev-fp8.safetensors?download=true
	curl -L -o "%modelsPath%/diffusion_models/FLUX/flux1-canny-dev-fp8.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/diffusion_models/FLUX/flux1-canny-dev-fp8.safetensors?download=true
) else if !memory_go! GEQ 14 (
    set "version=Q6"
	echo Your best version is  Q6
	curl -L -o "%modelsPath%/unet/FLUX/flux1-fill-dev-Q6_K.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-fill-dev-Q6_K.gguf?download=true
	curl -L -o "%modelsPath%/clip/t5-v1_1-xxl-encoder-Q6_K.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/t5-v1_1-xxl-encoder-Q6_K.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-depth-dev-fp16-Q5_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-depth-dev-fp16-Q5_0-GGUF.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-canny-dev-fp16-Q5_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-canny-dev-fp16-Q5_0-GGUF.gguf?download=true
) else if !memory_go! GEQ 12 (
    set "version=Q5"
	echo Your best version is  Q5
	curl -L -o "%modelsPath%/unet/FLUX/flux1-dev-Q5_K_S.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-dev-Q5_K_S.gguf?download=true
	curl -L -o "%modelsPath%/clip/t5-v1_1-xxl-encoder-Q5_K_M.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/t5-v1_1-xxl-encoder-Q5_K_M.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-depth-dev-fp16-Q5_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-depth-dev-fp16-Q5_0-GGUF.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-canny-dev-fp16-Q5_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-canny-dev-fp16-Q5_0-GGUF.gguf?download=true
) else if !memory_go! GEQ 10 (
    set "version=Q4"
	echo Your best version is  Q4
	curl -L -o "%modelsPath%/unet/FLUX/flux1-dev-Q4_K_S.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-dev-Q4_K_S.gguf?download=true
	curl -L -o "%modelsPath%/clip/t5-v1_1-xxl-encoder-Q4_K_S.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/t5-v1_1-xxl-encoder-Q4_K_S.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-depth-dev-fp16-Q4_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-depth-dev-fp16-Q4_0-GGUF.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-canny-dev-fp16-Q4_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-canny-dev-fp16-Q4_0-GGUF.gguf?download=true
) else if !memory_go! GEQ 8 (
    set "version=Q3"
	echo Your best version is  Q3
	curl -L -o "%modelsPath%/unet/FLUX/flux1-dev-Q3_K_S.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-dev-Q3_K_S.gguf?download=true
	curl -L -o "%modelsPath%/clip/t5-v1_1-xxl-encoder-Q3_K_S.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/t5-v1_1-xxl-encoder-Q3_K_S.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-depth-dev-fp16-Q4_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-depth-dev-fp16-Q4_0-GGUF.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-canny-dev-fp16-Q4_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-canny-dev-fp16-Q4_0-GGUF.gguf?download=true
) else (
    set "version=Q2"
	echo Your best version is  Q2
	curl -L -o "%modelsPath%/unet/FLUX/flux1-dev-Q2_K.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-dev-Q2_K.gguf?download=true
	curl -L -o "%modelsPath%/clip/t5-v1_1-xxl-encoder-Q3_K_S.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/t5-v1_1-xxl-encoder-Q3_K_S.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-depth-dev-fp16-Q4_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-depth-dev-fp16-Q4_0-GGUF.gguf?download=true
	curl -L -o "%modelsPath%/unet/FLUX/flux1-canny-dev-fp16-Q4_0-GGUF.gguf" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/unet/FLUX/flux1-canny-dev-fp16-Q4_0-GGUF.gguf?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/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/longclip-L.pt?download=true
curl -L -o "%modelsPath%/clip/ViT-L-14-TEXT-detail-improved-hiT-GmP-TE-only-HF.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip/ViT-L-14-TEXT-detail-improved-hiT-GmP-TE-only-HF.safetensors?download=true
REM Download VAE file
echo Downloading VAE file...
curl -L -o "%modelsPath%/vae/ae.safetensors" "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/vae/ae.safetensors?download=true"
REM Download clip vision
echo Downloading clip vision file...
curl -L -o "%modelsPath%/clip_vision/clip_vision_h.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/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/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/upscale_models/RealESRGAN_x4plus.pth?download=true
curl -L -o "%modelsPath%/upscale_models/RealESRGAN_x4plus_anime_6B.pth" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/upscale_models/RealESRGAN_x4plus_anime_6B.pth?download=true
REM Download UmeAiRT LoRA
echo Downloading UmeAiRT LoRAs...
powershell -NoProfile -Command "$p = Join-Path $env:modelsPath 'loras\FLUX'; if (-Not (Test-Path $p)) { New-Item -ItemType Directory -Path $p | Out-Null }"
curl -L -o "%modelsPath%/loras/FLUX/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/FLUX/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/FLUX/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/FLUX/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/FLUX/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/FLUX/ume_knight.safetensors" https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Ume_Knight/resolve/main/ume_gachaak.safetensors?download=true

echo Downloading FLUX ControlNet Models...

curl -L -o "%modelsPath%/xlabs/controlnets/flux-canny-controlnet-v3.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/xlabs/controlnets/flux-canny-controlnet-v3.safetensors?download=true
curl -L -o "%modelsPath%/xlabs/controlnets/flux-depth-controlnet-v3.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/xlabs/controlnets/flux-depth-controlnet-v3.safetensors?download=true
curl -L -o "%modelsPath%/xlabs/controlnets/flux-hed-controlnet-v3.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/xlabs/controlnets/flux-hed-controlnet-v3.safetensors?download=true
curl -L -o "%modelsPath%/diffusion_models/FLUX/flux1-depth-dev-fp8.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/diffusion_models/FLUX/flux1-depth-dev-fp8.safetensors?download=true
curl -L -o "%modelsPath%/diffusion_models/FLUX/flux1-canny-dev-fp8.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/diffusion_models/FLUX/flux1-canny-dev-fp8.safetensors?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
echo Downloading FLUX PuLID...
mkdir "%modelsPath%/pulid"
curl -L -o "%modelsPath%/pulid/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
curl -L -o "%modelsPath%/clip_vision/sigclip_vision_patch14_384.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/clip_vision/sigclip_vision_patch14_384.safetensors?download=true
curl -L -o "%modelsPath%/style_models/flux1-redux-dev.safetensors" https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models/style_models/flux1-redux-dev.safetensors?download=true

echo Models downloaded.
pause