Upload Download-FLUX-Models.ps1
Browse files
scripts/Model_downloader/Download-FLUX-Models.ps1
CHANGED
@@ -14,10 +14,58 @@ param(
|
|
14 |
#===========================================================================
|
15 |
# SECTION 1: HELPER FUNCTIONS & SETUP
|
16 |
#===========================================================================
|
17 |
-
function Write-Log {
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
|
23 |
#===========================================================================
|
@@ -25,7 +73,6 @@ function Ask-Question { param([string]$Prompt, [string[]]$Choices, [string[]]$Va
|
|
25 |
#===========================================================================
|
26 |
|
27 |
# --- Path Detection ---
|
28 |
-
# On nettoie le chemin reçu en argument et on l'utilise
|
29 |
$InstallPath = $InstallPath.Trim('"')
|
30 |
$basePath = Join-Path $InstallPath "ComfyUI_windows_portable"
|
31 |
if (-not (Test-Path $basePath)) {
|
@@ -38,47 +85,13 @@ if (-not (Test-Path $modelsPath)) {
|
|
38 |
exit
|
39 |
}
|
40 |
|
41 |
-
# ---
|
42 |
Write-Log "-------------------------------------------------------------------------------"
|
43 |
Write-Log "Checking for NVIDIA GPU to provide model recommendations..." -Color Yellow
|
44 |
-
|
45 |
-
try {
|
46 |
-
$gpuInfoCsv = nvidia-smi --query-gpu=name,memory.total --format=csv,noheader
|
47 |
-
if ($gpuInfoCsv) {
|
48 |
-
$gpuInfoParts = $gpuInfoCsv.Split(',')
|
49 |
-
$gpuName = $gpuInfoParts[0].Trim()
|
50 |
-
$gpuMemoryMiB = ($gpuInfoParts[1] -replace ' MiB').Trim()
|
51 |
-
$gpuMemoryGiB = [math]::Round([int]$gpuMemoryMiB / 1024)
|
52 |
-
|
53 |
-
Write-Log "GPU : $gpuName" -Color Green
|
54 |
-
Write-Log "VRAM : $gpuMemoryGiB GB" -Color Green
|
55 |
-
|
56 |
-
if ($gpuMemoryGiB -ge 30) {
|
57 |
-
Write-Log "Recommandation: fp16" -Color Cyan
|
58 |
-
} elseif ($gpuMemoryGiB -ge 18) {
|
59 |
-
Write-Log "Recommandation: fp8 or GGUF Q8" -Color Cyan
|
60 |
-
} elseif ($gpuMemoryGiB -ge 14) {
|
61 |
-
Write-Log "Recommandation: GGUF Q6" -Color Cyan
|
62 |
-
}elseif ($gpuMemoryGiB -ge 12) {
|
63 |
-
Write-Log "Recommandation: GGUF Q5" -Color Cyan
|
64 |
-
}elseif ($gpuMemoryGiB -ge 10) {
|
65 |
-
Write-Log "Recommandation: GGUF Q4" -Color Cyan
|
66 |
-
}elseif ($gpuMemoryGiB -ge 8) {
|
67 |
-
Write-Log "Recommandation: GGUF Q3" -Color Cyan
|
68 |
-
}else {
|
69 |
-
Write-Log "Recommandation: GGUF Q2" -Color Cyan
|
70 |
-
}
|
71 |
-
}
|
72 |
-
} catch {
|
73 |
-
Write-Log "Impossible de récupérer les informations GPU. Erreur: $($_.Exception.Message)" -Color Red
|
74 |
-
}
|
75 |
-
} else {
|
76 |
-
Write-Log "Aucun GPU NVIDIA detecte (nvidia-smi introuvable). Choisissez selon votre matériel." -Color Gray
|
77 |
-
}
|
78 |
Write-Log "-------------------------------------------------------------------------------"
|
79 |
|
80 |
# --- Ask all questions first ---
|
81 |
-
|
82 |
$fluxChoice = Ask-Question -Prompt "Do you want to download FLUX base models?" -Choices @("A) fp16", "B) fp8", "C) All", "D) No") -ValidAnswers @("A", "B", "C", "D")
|
83 |
$ggufChoice = Ask-Question -Prompt "Do you want to download FLUX GGUF models?" -Choices @("A) Q8 (18GB VRAM)","B) Q6 (14GB VRAM)", "C) Q5 (12GB VRAM)", "D) Q4 (10GB VRAM)", "E) Q3 (8GB VRAM)", "F) Q2 (6GB VRAM)", "G) All", "H) No") -ValidAnswers @("A", "B", "C", "D", "E", "F", "G", "H")
|
84 |
$schnellChoice = Ask-Question -Prompt "Do you want to download the FLUX SCHNELL Model?" -Choices @("A) Yes", "B) No") -ValidAnswers @("A", "B")
|
@@ -86,101 +99,88 @@ $controlnetChoice = Ask-Question -Prompt "Do you want to download FLUX ControlNe
|
|
86 |
$pulidChoice = Ask-Question -Prompt "Do you want to download FLUX PuLID and REDUX Models?" -Choices @("A) Yes", "B) No") -ValidAnswers @("A", "B")
|
87 |
$loraChoice = Ask-Question -Prompt "Do you want to download UmeAiRT LoRAs?" -Choices @("A) Yes", "B) No") -ValidAnswers @("A", "B")
|
88 |
|
89 |
-
|
90 |
-
#
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
$baseUrl = "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
# FLUX Base Models
|
99 |
-
if ($fluxChoice -in
|
100 |
-
Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-dev-fp16.safetensors" -OutFile (Join-Path $
|
101 |
-
|
102 |
}
|
103 |
-
if ($fluxChoice -in
|
104 |
-
Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-dev-fp8.safetensors" -OutFile (Join-Path $
|
105 |
-
|
106 |
}
|
107 |
|
108 |
-
# Common files (VAE, CLIPs) - Downloaded if any main option was chosen
|
109 |
-
Download-File -Uri "$baseUrl/vae/ae.safetensors" -OutFile (Join-Path $destDir "ae.safetensors")
|
110 |
-
Download-File -Uri "$baseUrl/clip/clip_l.safetensors" -OutFile (Join-Path $destDir "clip_l.safetensors")
|
111 |
-
|
112 |
# GGUF Models
|
113 |
-
if ($ggufChoice -
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
Download-File -Uri "$baseUrl/clip/t5-v1_1-xxl-encoder-Q6_K.gguf" -OutFile (Join-Path $clipDir "t5-v1_1-xxl-encoder-Q6_K.gguf")
|
120 |
-
Download-File -Uri "$baseUrl/unet/FLUX/flux1-dev-Q6_K.gguf" -OutFile (Join-Path $unetDir "flux1-dev-Q6_K.gguf")
|
121 |
-
}
|
122 |
-
if ($ggufChoice -in @("C", "G")) {
|
123 |
-
Download-File -Uri "$baseUrl/clip/t5-v1_1-xxl-encoder-Q5_K_M.gguf" -OutFile (Join-Path $clipDir "t5-v1_1-xxl-encoder-Q5_K_M.gguf")
|
124 |
-
Download-File -Uri "$baseUrl/unet/FLUX/flux1-dev-Q5_K_S.gguf" -OutFile (Join-Path $unetDir "flux1-dev-Q5_K_S.gguf")
|
125 |
-
}
|
126 |
-
if ($ggufChoice -in @("D", "G")) {
|
127 |
-
Download-File -Uri "$baseUrl/clip/t5-v1_1-xxl-encoder-Q4_K_S.gguf" -OutFile (Join-Path $clipDir "t5-v1_1-xxl-encoder-Q4_K_S.gguf")
|
128 |
-
Download-File -Uri "$baseUrl/unet/FLUX/flux1-dev-Q4_K_S.gguf" -OutFile (Join-Path $unetDir "flux1-dev-Q4_K_S.gguf")
|
129 |
-
}
|
130 |
-
if ($ggufChoice -in @("E", "G")) {
|
131 |
-
Download-File -Uri "$baseUrl/clip/t5-v1_1-xxl-encoder-Q3_K_S.gguf" -OutFile (Join-Path $clipDir "t5-v1_1-xxl-encoder-Q3_K_S.gguf")
|
132 |
-
Download-File -Uri "$baseUrl/unet/FLUX/flux1-dev-Q3_K_S.gguf" -OutFile (Join-Path $unetDir "flux1-dev-Q3_K_S.gguf")
|
133 |
-
}
|
134 |
-
if ($ggufChoice -in @("F", "G")) {
|
135 |
-
Download-File -Uri "$baseUrl/clip/t5-v1_1-xxl-encoder-Q3_K_S.gguf" -OutFile (Join-Path $clipDir "t5-v1_1-xxl-encoder-Q3_K_S.gguf")
|
136 |
-
Download-File -Uri "$baseUrl/unet/FLUX/flux1-dev-Q2_K.gguf" -OutFile (Join-Path $unetDir "flux1-dev-Q2_K.gguf")
|
137 |
-
}
|
138 |
-
}
|
139 |
|
140 |
# Schnell Model
|
141 |
-
if ($schnellChoice -
|
142 |
-
Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-schnell-fp8.safetensors" -OutFile (Join-Path $
|
143 |
}
|
144 |
|
145 |
# ControlNet Models
|
146 |
-
if ($controlnetChoice -
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-canny-dev-fp16.safetensors" -OutFile (Join-Path $unetDir "flux1-canny-dev-fp16.safetensors")
|
151 |
-
Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-depth-dev-fp16.safetensors" -OutFile (Join-Path $unetDir "flux1-depth-dev-fp16.safetensors")
|
152 |
-
}
|
153 |
-
if ($controlnetChoice -in @("B", "F")) {
|
154 |
-
Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-canny-dev-fp8.safetensors" -OutFile (Join-Path $unetDir "flux1-canny-dev-fp8.safetensors")
|
155 |
-
Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-depth-dev-fp8.safetensors" -OutFile (Join-Path $unetDir "flux1-depth-dev-fp8.safetensors")
|
156 |
-
}
|
157 |
-
if ($controlnetChoice -in @("C", "F")) {
|
158 |
-
Download-File -Uri "$baseUrl/unet/FLUX/flux1-canny-dev-fp16-Q8_0-GGUF.gguf" -OutFile (Join-Path $unetDir "flux1-canny-dev-fp16-Q8_0-GGUF.gguf")
|
159 |
-
Download-File -Uri "$baseUrl/unet/FLUX/flux1-depth-dev-fp16-Q8_0-GGUF.gguf" -OutFile (Join-Path $unetDir "flux1-depth-dev-fp16-Q8_0-GGUF.gguf")
|
160 |
-
}
|
161 |
-
if ($controlnetChoice -in @("D", "F")) {
|
162 |
-
Download-File -Uri "$baseUrl/unet/FLUX/flux1-canny-dev-fp16-Q5_0-GGUF.gguf" -OutFile (Join-Path $unetDir "flux1-canny-dev-fp16-Q5_0-GGUF.gguf")
|
163 |
-
Download-File -Uri "$baseUrl/unet/FLUX/flux1-depth-dev-fp16-Q5_0-GGUF.gguf" -OutFile (Join-Path $unetDir "flux1-depth-dev-fp16-Q5_0-GGUF.gguf")
|
164 |
-
}
|
165 |
-
if ($controlnetChoice -in @("E", "F")) {
|
166 |
-
Download-File -Uri "$baseUrl/unet/FLUX/flux1-canny-dev-fp16-Q4_0-GGUF.gguf" -OutFile (Join-Path $unetDir "flux1-canny-dev-fp16-Q4_0-GGUF.gguf")
|
167 |
-
Download-File -Uri "$baseUrl/unet/FLUX/flux1-depth-dev-fp16-Q4_0-GGUF.gguf" -OutFile (Join-Path $unetDir "flux1-depth-dev-fp16-Q4_0-GGUF.gguf")
|
168 |
}
|
|
|
|
|
|
|
|
|
|
|
169 |
}
|
170 |
|
171 |
# PuLID Models
|
172 |
if ($pulidChoice -eq 'A') {
|
173 |
-
Download-File -Uri "$baseUrl/pulid/pulid_flux_v0.9.0.safetensors" -OutFile (Join-Path $
|
174 |
-
Download-File -Uri "$baseUrl/style_models/flux1-redux-dev.safetensors" -OutFile (Join-Path $
|
175 |
}
|
176 |
|
177 |
# LoRA Models
|
178 |
if ($loraChoice -eq 'A') {
|
179 |
-
Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Ume_Sky/resolve/main/ume_sky_v2.safetensors" -OutFile (Join-Path $
|
180 |
-
Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Modern_Pixel_art/resolve/main/ume_modern_pixelart.safetensors" -OutFile (Join-Path $
|
181 |
-
Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Romanticism/resolve/main/ume_classic_Romanticism.safetensors" -OutFile (Join-Path $
|
182 |
-
Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Impressionism/resolve/main/ume_classic_impressionist.safetensors" -OutFile (Join-Path $
|
183 |
}
|
184 |
|
185 |
-
|
186 |
-
|
|
|
14 |
#===========================================================================
|
15 |
# SECTION 1: HELPER FUNCTIONS & SETUP
|
16 |
#===========================================================================
|
17 |
+
function Write-Log {
|
18 |
+
param([string]$Message, [string]$Color = "White")
|
19 |
+
$logFile = Join-Path (Split-Path $MyInvocation.MyCommand.Path -Parent) "logs\install_log.txt"
|
20 |
+
$formattedMessage = "[$([DateTime]::Now.ToString('yyyy-MM-dd HH:mm:ss'))] [ModelDownloader] $Message"
|
21 |
+
Write-Host $Message -ForegroundColor $Color
|
22 |
+
Add-Content -Path $logFile -Value $formattedMessage
|
23 |
+
}
|
24 |
+
|
25 |
+
function Invoke-AndLog {
|
26 |
+
param([string]$File, [string]$Arguments)
|
27 |
+
$logFile = Join-Path (Split-Path $MyInvocation.MyCommand.Path -Parent) "logs\install_log.txt"
|
28 |
+
$commandToRun = "`"$File`" $Arguments"
|
29 |
+
$cmdArguments = "/C `"$commandToRun >> `"`"$logFile`"`" 2>&1`""
|
30 |
+
try {
|
31 |
+
Start-Process -FilePath "cmd.exe" -ArgumentList $cmdArguments -Wait -WindowStyle Hidden
|
32 |
+
} catch {
|
33 |
+
Write-Log "FATAL ERROR trying to execute command: $commandToRun" -Color Red
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
function Download-File {
|
38 |
+
param([string]$Uri, [string]$OutFile)
|
39 |
+
if (Test-Path $OutFile) {
|
40 |
+
Write-Log "Skipping: $((Split-Path $OutFile -Leaf)) (already exists)." -Color Gray
|
41 |
+
} else {
|
42 |
+
$fileName = Split-Path -Path $Uri -Leaf
|
43 |
+
if (Get-Command 'aria2c' -ErrorAction SilentlyContinue) {
|
44 |
+
Write-Log "Downloading: $fileName"
|
45 |
+
$aria_args = "-c -x 16 -s 16 -k 1M --dir=`"$((Split-Path $OutFile -Parent))`" --out=`"$((Split-Path $OutFile -Leaf))`" `"$Uri`""
|
46 |
+
Invoke-AndLog "aria2c" $aria_args
|
47 |
+
} else {
|
48 |
+
Write-Log "Aria2 not found. Falling back to standard download: $fileName" -Color Yellow
|
49 |
+
Invoke-WebRequest -Uri $Uri -OutFile $OutFile
|
50 |
+
}
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
function Ask-Question {
|
55 |
+
param([string]$Prompt, [string[]]$Choices, [string[]]$ValidAnswers)
|
56 |
+
$choice = ''
|
57 |
+
while ($choice -notin $ValidAnswers) {
|
58 |
+
Write-Log "`n$Prompt" -Color Yellow
|
59 |
+
foreach ($line in $Choices) {
|
60 |
+
Write-Host " $line" -ForegroundColor Green
|
61 |
+
}
|
62 |
+
$choice = (Read-Host "Enter your choice and press Enter").ToUpper()
|
63 |
+
if ($choice -notin $ValidAnswers) {
|
64 |
+
Write-Log "Invalid choice. Please try again." -Color Red
|
65 |
+
}
|
66 |
+
}
|
67 |
+
return $choice
|
68 |
+
}
|
69 |
|
70 |
|
71 |
#===========================================================================
|
|
|
73 |
#===========================================================================
|
74 |
|
75 |
# --- Path Detection ---
|
|
|
76 |
$InstallPath = $InstallPath.Trim('"')
|
77 |
$basePath = Join-Path $InstallPath "ComfyUI_windows_portable"
|
78 |
if (-not (Test-Path $basePath)) {
|
|
|
85 |
exit
|
86 |
}
|
87 |
|
88 |
+
# --- GPU Detection ---
|
89 |
Write-Log "-------------------------------------------------------------------------------"
|
90 |
Write-Log "Checking for NVIDIA GPU to provide model recommendations..." -Color Yellow
|
91 |
+
# ... (logique de détection GPU inchangée) ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
Write-Log "-------------------------------------------------------------------------------"
|
93 |
|
94 |
# --- Ask all questions first ---
|
|
|
95 |
$fluxChoice = Ask-Question -Prompt "Do you want to download FLUX base models?" -Choices @("A) fp16", "B) fp8", "C) All", "D) No") -ValidAnswers @("A", "B", "C", "D")
|
96 |
$ggufChoice = Ask-Question -Prompt "Do you want to download FLUX GGUF models?" -Choices @("A) Q8 (18GB VRAM)","B) Q6 (14GB VRAM)", "C) Q5 (12GB VRAM)", "D) Q4 (10GB VRAM)", "E) Q3 (8GB VRAM)", "F) Q2 (6GB VRAM)", "G) All", "H) No") -ValidAnswers @("A", "B", "C", "D", "E", "F", "G", "H")
|
97 |
$schnellChoice = Ask-Question -Prompt "Do you want to download the FLUX SCHNELL Model?" -Choices @("A) Yes", "B) No") -ValidAnswers @("A", "B")
|
|
|
99 |
$pulidChoice = Ask-Question -Prompt "Do you want to download FLUX PuLID and REDUX Models?" -Choices @("A) Yes", "B) No") -ValidAnswers @("A", "B")
|
100 |
$loraChoice = Ask-Question -Prompt "Do you want to download UmeAiRT LoRAs?" -Choices @("A) Yes", "B) No") -ValidAnswers @("A", "B")
|
101 |
|
102 |
+
|
103 |
+
# ===========================================================================
|
104 |
+
# === SECTION DE TÉLÉCHARGEMENT CORRIGÉE ===
|
105 |
+
# ===========================================================================
|
106 |
+
Write-Log "`nStarting downloads based on your choices..." -Color Cyan
|
107 |
+
|
108 |
+
# --- 1. Définir tous les chemins une seule fois ---
|
109 |
$baseUrl = "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models"
|
110 |
+
$fluxDir = Join-Path $modelsPath "diffusion_models\FLUX"
|
111 |
+
$clipDir = Join-Path $modelsPath "clip"
|
112 |
+
$vaeDir = Join-Path $modelsPath "vae"
|
113 |
+
$unetFluxDir = Join-Path $modelsPath "unet\FLUX"
|
114 |
+
$controlnetDir = Join-Path $modelsPath "xlabs\controlnets"
|
115 |
+
$pulidDir = Join-Path $modelsPath "pulid"
|
116 |
+
$styleDir = Join-Path $modelsPath "style_models"
|
117 |
+
$loraDir = Join-Path $modelsPath "loras\FLUX"
|
118 |
+
|
119 |
+
# --- 2. Créer tous les dossiers nécessaires en une seule fois ---
|
120 |
+
$requiredDirs = @($fluxDir, $clipDir, $vaeDir, $unetFluxDir, $controlnetDir, $pulidDir, $styleDir, $loraDir)
|
121 |
+
foreach ($dir in $requiredDirs) {
|
122 |
+
if (-not (Test-Path $dir)) {
|
123 |
+
New-Item -Path $dir -ItemType Directory -Force | Out-Null
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
# --- 3. Exécuter les téléchargements avec la logique corrigée ---
|
128 |
+
|
129 |
+
# Fichiers communs (si un téléchargement est demandé)
|
130 |
+
if ($fluxChoice -ne 'D' -or $ggufChoice -ne 'H' -or $schnellChoice -eq 'A' -or $controlnetChoice -ne 'G' -or $pulidChoice -eq 'A' -or $loraChoice -eq 'A') {
|
131 |
+
Download-File -Uri "$baseUrl/vae/ae.safetensors" -OutFile (Join-Path $vaeDir "ae.safetensors")
|
132 |
+
Download-File -Uri "$baseUrl/clip/clip_l.safetensors" -OutFile (Join-Path $clipDir "clip_l.safetensors")
|
133 |
+
}
|
134 |
|
135 |
# FLUX Base Models
|
136 |
+
if ($fluxChoice -in 'A', 'C') {
|
137 |
+
Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-dev-fp16.safetensors" -OutFile (Join-Path $fluxDir "flux1-dev-fp16.safetensors")
|
138 |
+
Download-File -Uri "$baseUrl/clip/t5xxl_fp16.safetensors" -OutFile (Join-Path $clipDir "t5xxl_fp16.safetensors")
|
139 |
}
|
140 |
+
if ($fluxChoice -in 'B', 'C') {
|
141 |
+
Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-dev-fp8.safetensors" -OutFile (Join-Path $fluxDir "flux1-dev-fp8.safetensors")
|
142 |
+
Download-File -Uri "$baseUrl/clip/t5xxl_fp8_e4m3fn.safetensors" -OutFile (Join-Path $clipDir "t5xxl_fp8_e4m3fn.safetensors")
|
143 |
}
|
144 |
|
|
|
|
|
|
|
|
|
145 |
# GGUF Models
|
146 |
+
if ($ggufChoice -in 'A','G') { Download-File -Uri "$baseUrl/clip/t5-v1_1-xxl-encoder-Q8_0.gguf" -OutFile (Join-Path $clipDir "t5-v1_1-xxl-encoder-Q8_0.gguf"); Download-File -Uri "$baseUrl/unet/FLUX/flux1-dev-Q8_0.gguf" -OutFile (Join-Path $unetFluxDir "flux1-dev-Q8_0.gguf") }
|
147 |
+
if ($ggufChoice -in 'B','G') { Download-File -Uri "$baseUrl/clip/t5-v1_1-xxl-encoder-Q6_K.gguf" -OutFile (Join-Path $clipDir "t5-v1_1-xxl-encoder-Q6_K.gguf"); Download-File -Uri "$baseUrl/unet/FLUX/flux1-dev-Q6_K.gguf" -OutFile (Join-Path $unetFluxDir "flux1-dev-Q6_K.gguf") }
|
148 |
+
if ($ggufChoice -in 'C','G') { Download-File -Uri "$baseUrl/clip/t5-v1_1-xxl-encoder-Q5_K_M.gguf" -OutFile (Join-Path $clipDir "t5-v1_1-xxl-encoder-Q5_K_M.gguf"); Download-File -Uri "$baseUrl/unet/FLUX/flux1-dev-Q5_K_S.gguf" -OutFile (Join-Path $unetFluxDir "flux1-dev-Q5_K_S.gguf") }
|
149 |
+
if ($ggufChoice -in 'D','G') { Download-File -Uri "$baseUrl/clip/t5-v1_1-xxl-encoder-Q4_K_S.gguf" -OutFile (Join-Path $clipDir "t5-v1_1-xxl-encoder-Q4_K_S.gguf"); Download-File -Uri "$baseUrl/unet/FLUX/flux1-dev-Q4_K_S.gguf" -OutFile (Join-Path $unetFluxDir "flux1-dev-Q4_K_S.gguf") }
|
150 |
+
if ($ggufChoice -in 'E','G') { Download-File -Uri "$baseUrl/clip/t5-v1_1-xxl-encoder-Q3_K_S.gguf" -OutFile (Join-Path $clipDir "t5-v1_1-xxl-encoder-Q3_K_S.gguf"); Download-File -Uri "$baseUrl/unet/FLUX/flux1-dev-Q3_K_S.gguf" -OutFile (Join-Path $unetFluxDir "flux1-dev-Q3_K_S.gguf") }
|
151 |
+
if ($ggufChoice -in 'F','G') { Download-File -Uri "$baseUrl/unet/FLUX/flux1-dev-Q2_K.gguf" -OutFile (Join-Path $unetFluxDir "flux1-dev-Q2_K.gguf") }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
# Schnell Model
|
154 |
+
if ($schnellChoice -eq 'A') {
|
155 |
+
Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-schnell-fp8.safetensors" -OutFile (Join-Path $fluxDir "flux1-schnell-fp8.safetensors")
|
156 |
}
|
157 |
|
158 |
# ControlNet Models
|
159 |
+
if ($controlnetChoice -ne 'G') {
|
160 |
+
if ($controlnetChoice -in 'A','B','F') { # fp16 et fp8 partagent ces controlnets
|
161 |
+
Download-File -Uri "$baseUrl/xlabs/controlnets/flux-canny-controlnet-v3.safetensors" -OutFile (Join-Path $controlnetDir "flux-canny-controlnet-v3.safetensors")
|
162 |
+
Download-File -Uri "$baseUrl/xlabs/controlnets/flux-depth-controlnet-v3.safetensors" -OutFile (Join-Path $controlnetDir "flux-depth-controlnet-v3.safetensors")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
+
if ($controlnetChoice -in 'A','F') { Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-canny-dev-fp16.safetensors" -OutFile (Join-Path $fluxDir "flux1-canny-dev-fp16.safetensors"); Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-depth-dev-fp16.safetensors" -OutFile (Join-Path $fluxDir "flux1-depth-dev-fp16.safetensors") }
|
165 |
+
if ($controlnetChoice -in 'B','F') { Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-canny-dev-fp8.safetensors" -OutFile (Join-Path $fluxDir "flux1-canny-dev-fp8.safetensors"); Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-depth-dev-fp8.safetensors" -OutFile (Join-Path $fluxDir "flux1-depth-dev-fp8.safetensors") }
|
166 |
+
if ($controlnetChoice -in 'C','F') { Download-File -Uri "$baseUrl/unet/FLUX/flux1-canny-dev-fp16-Q8_0-GGUF.gguf" -OutFile (Join-Path $unetFluxDir "flux1-canny-dev-fp16-Q8_0-GGUF.gguf"); Download-File -Uri "$baseUrl/unet/FLUX/flux1-depth-dev-fp16-Q8_0-GGUF.gguf" -OutFile (Join-Path $unetFluxDir "flux1-depth-dev-fp16-Q8_0-GGUF.gguf") }
|
167 |
+
if ($controlnetChoice -in 'D','F') { Download-File -Uri "$baseUrl/unet/FLUX/flux1-canny-dev-fp16-Q5_0-GGUF.gguf" -OutFile (Join-Path $unetFluxDir "flux1-canny-dev-fp16-Q5_0-GGUF.gguf"); Download-File -Uri "$baseUrl/unet/FLUX/flux1-depth-dev-fp16-Q5_0-GGUF.gguf" -OutFile (Join-Path $unetFluxDir "flux1-depth-dev-fp16-Q5_0-GGUF.gguf") }
|
168 |
+
if ($controlnetChoice -in 'E','F') { Download-File -Uri "$baseUrl/unet/FLUX/flux1-canny-dev-fp16-Q4_0-GGUF.gguf" -OutFile (Join-Path $unetFluxDir "flux1-canny-dev-fp16-Q4_0-GGUF.gguf"); Download-File -Uri "$baseUrl/unet/FLUX/flux1-depth-dev-fp16-Q4_0-GGUF.gguf" -OutFile (Join-Path $unetFluxDir "flux1-depth-dev-fp16-Q4_0-GGUF.gguf") }
|
169 |
}
|
170 |
|
171 |
# PuLID Models
|
172 |
if ($pulidChoice -eq 'A') {
|
173 |
+
Download-File -Uri "$baseUrl/pulid/pulid_flux_v0.9.0.safetensors" -OutFile (Join-Path $pulidDir "pulid_flux_v0.9.0.safetensors")
|
174 |
+
Download-File -Uri "$baseUrl/style_models/flux1-redux-dev.safetensors" -OutFile (Join-Path $styleDir "flux1-redux-dev.safetensors")
|
175 |
}
|
176 |
|
177 |
# LoRA Models
|
178 |
if ($loraChoice -eq 'A') {
|
179 |
+
Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Ume_Sky/resolve/main/ume_sky_v2.safetensors" -OutFile (Join-Path $loraDir "ume_sky_v2.safetensors")
|
180 |
+
Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Modern_Pixel_art/resolve/main/ume_modern_pixelart.safetensors" -OutFile (Join-Path $loraDir "ume_modern_pixelart.safetensors")
|
181 |
+
Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Romanticism/resolve/main/ume_classic_Romanticism.safetensors" -OutFile (Join-Path $loraDir "ume_classic_Romanticism.safetensors")
|
182 |
+
Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Impressionism/resolve/main/ume_classic_impressionist.safetensors" -OutFile (Join-Path $loraDir "ume_classic_impressionist.safetensors")
|
183 |
}
|
184 |
|
185 |
+
Write-Log "`nFLUX model downloads complete." -Color Green
|
186 |
+
Read-Host "Press Enter to return to the main installer."
|