Upload 2 files
Browse files
scripts/Model_downloader/Download-HIDREAM-Models.ps1
CHANGED
|
@@ -6,22 +6,68 @@ param(
|
|
| 6 |
.SYNOPSIS
|
| 7 |
A PowerShell script to interactively download HiDream models for ComfyUI.
|
| 8 |
.DESCRIPTION
|
| 9 |
-
This version corrects
|
| 10 |
#>
|
| 11 |
|
| 12 |
#===========================================================================
|
| 13 |
# SECTION 1: HELPER FUNCTIONS & SETUP
|
| 14 |
#===========================================================================
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
#===========================================================================
|
| 22 |
# SECTION 2: SCRIPT EXECUTION
|
| 23 |
#===========================================================================
|
| 24 |
-
|
| 25 |
$InstallPath = $InstallPath.Trim('"')
|
| 26 |
$comfyPath = Join-Path $InstallPath "ComfyUI"
|
| 27 |
$modelsPath = Join-Path $comfyPath "models"
|
|
@@ -30,16 +76,7 @@ if (-not (Test-Path $modelsPath)) { Write-Log "Could not find ComfyUI models pat
|
|
| 30 |
# --- GPU Detection ---
|
| 31 |
Write-Log "-------------------------------------------------------------------------------"
|
| 32 |
Write-Log "Checking for NVIDIA GPU to provide model recommendations..." -Color Yellow
|
| 33 |
-
|
| 34 |
-
try {
|
| 35 |
-
$gpuInfoCsv = nvidia-smi --query-gpu=name,memory.total --format=csv,noheader
|
| 36 |
-
if ($gpuInfoCsv) {
|
| 37 |
-
$gpuInfoParts = $gpuInfoCsv.Split(','); $gpuName = $gpuInfoParts[0].Trim(); $gpuMemoryMiB = ($gpuInfoParts[1] -replace ' MiB').Trim(); $gpuMemoryGiB = [math]::Round([int]$gpuMemoryMiB / 1024)
|
| 38 |
-
Write-Log "GPU : $gpuName" -Color Green; Write-Log "VRAM : $gpuMemoryGiB GB" -Color Green
|
| 39 |
-
if ($gpuMemoryGiB -ge 24) { Write-Log "Recommandation: fp8" -Color Cyan } elseif ($gpuMemoryGiB -ge 16) { Write-Log "Recommandation: GGUF Q8_0" -Color Cyan } elseif ($gpuMemoryGiB -ge 12) { Write-Log "Recommandation: GGUF Q5_K_S" -Color Cyan } else { Write-Log "Recommandation: GGUF Q4_K_S" -Color Cyan }
|
| 40 |
-
}
|
| 41 |
-
} catch { Write-Log "Impossible de récupérer les informations GPU. Erreur: $($_.Exception.Message)" -Color Red }
|
| 42 |
-
} else { Write-Log "Aucun GPU NVIDIA detecte (nvidia-smi introuvable). Choisissez selon votre matériel." -Color Gray }
|
| 43 |
Write-Log "-------------------------------------------------------------------------------"
|
| 44 |
|
| 45 |
# --- Ask all questions ---
|
|
@@ -49,16 +86,11 @@ $ggufChoice = Ask-Question "Do you want to download HiDream GGUF models?" @("A)
|
|
| 49 |
# --- Download files based on answers ---
|
| 50 |
Write-Log "`nStarting HiDream model downloads..." -Color Cyan
|
| 51 |
$baseUrl = "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models"
|
| 52 |
-
$hidreamDiffDir = Join-Path $modelsPath "diffusion_models\HIDREAM"
|
| 53 |
-
$hidreamUnetDir = Join-Path $modelsPath "unet\HIDREAM"
|
| 54 |
-
$clipDir = Join-Path $modelsPath "clip"
|
| 55 |
-
$vaeDir = Join-Path $modelsPath "vae"
|
| 56 |
New-Item -Path $hidreamDiffDir, $hidreamUnetDir, $clipDir, $vaeDir -ItemType Directory -Force | Out-Null
|
| 57 |
|
| 58 |
-
# === CORRECTION : Déterminer si un téléchargement est nécessaire ===
|
| 59 |
$doDownload = ($fp8Choice -eq 'A' -or $ggufChoice -ne 'E')
|
| 60 |
|
| 61 |
-
# Télécharger les fichiers communs si nécessaire
|
| 62 |
if ($doDownload) {
|
| 63 |
Write-Log "`nDownloading HiDream common support files (VAE, CLIPs)..."
|
| 64 |
Download-File -Uri "$baseUrl/vae/ae.safetensors?download=true" -OutFile (Join-Path $vaeDir "ae.safetensors")
|
|
@@ -68,13 +100,11 @@ if ($doDownload) {
|
|
| 68 |
Download-File -Uri "$baseUrl/clip/llama_3.1_8b_instruct_fp8_scaled.safetensors?download=true" -OutFile (Join-Path $clipDir "llama_3.1_8b_instruct_fp8_scaled.safetensors")
|
| 69 |
}
|
| 70 |
|
| 71 |
-
# fp8 Model (uniquement le modèle principal)
|
| 72 |
if ($fp8Choice -eq 'A') {
|
| 73 |
Write-Log "`nDownloading HiDream fp8 model..."
|
| 74 |
Download-File -Uri "$baseUrl/diffusion_models/HiDream/hidream_i1_dev_fp8.safetensors?download=true" -OutFile (Join-Path $hidreamDiffDir "hidream_i1_dev_fp8.safetensors")
|
| 75 |
}
|
| 76 |
|
| 77 |
-
# GGUF Models
|
| 78 |
if ($ggufChoice -ne 'E') {
|
| 79 |
Write-Log "`nDownloading HiDream GGUF models..."
|
| 80 |
if ($ggufChoice -in 'A', 'D') { Download-File -Uri "$baseUrl/unet/HiDream/hidream-i1-dev-Q8_0.gguf?download=true" -OutFile (Join-Path $hidreamUnetDir "hidream-i1-dev-Q8_0.gguf") }
|
|
|
|
| 6 |
.SYNOPSIS
|
| 7 |
A PowerShell script to interactively download HiDream models for ComfyUI.
|
| 8 |
.DESCRIPTION
|
| 9 |
+
This version corrects a major syntax error in the helper functions.
|
| 10 |
#>
|
| 11 |
|
| 12 |
#===========================================================================
|
| 13 |
# SECTION 1: HELPER FUNCTIONS & SETUP
|
| 14 |
#===========================================================================
|
| 15 |
+
function Write-Log {
|
| 16 |
+
param([string]$Message, [string]$Color = "White")
|
| 17 |
+
$logFile = Join-Path $InstallPath "logs\install_log.txt"
|
| 18 |
+
$formattedMessage = "[$([DateTime]::Now.ToString('yyyy-MM-dd HH:mm:ss'))] [ModelDownloader-HiDream] $Message"
|
| 19 |
+
Write-Host $Message -ForegroundColor $Color
|
| 20 |
+
Add-Content -Path $logFile -Value $formattedMessage -ErrorAction SilentlyContinue
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
function Invoke-AndLog {
|
| 24 |
+
param([string]$File, [string]$Arguments)
|
| 25 |
+
$logFile = Join-Path $InstallPath "logs\install_log.txt"
|
| 26 |
+
$commandToRun = "`"$File`" $Arguments"
|
| 27 |
+
$cmdArguments = "/C `"$commandToRun >> `"`"$logFile`"`" 2>&1`""
|
| 28 |
+
try {
|
| 29 |
+
Start-Process -FilePath "cmd.exe" -ArgumentList $cmdArguments -Wait -WindowStyle Hidden
|
| 30 |
+
} catch {
|
| 31 |
+
Write-Log "FATAL ERROR trying to execute command: $commandToRun" -Color Red
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
function Download-File {
|
| 36 |
+
param([string]$Uri, [string]$OutFile)
|
| 37 |
+
if (Test-Path $OutFile) {
|
| 38 |
+
Write-Log "Skipping: $((Split-Path $OutFile -Leaf)) (already exists)." -Color Gray
|
| 39 |
+
} else {
|
| 40 |
+
$fileName = Split-Path -Path $Uri -Leaf
|
| 41 |
+
if (Get-Command 'aria2c' -ErrorAction SilentlyContinue) {
|
| 42 |
+
Write-Log "Downloading: $fileName"
|
| 43 |
+
$aria_args = "-c -x 16 -s 16 -k 1M --dir=`"$((Split-Path $OutFile -Parent))`" --out=`"$((Split-Path $OutFile -Leaf))`" `"$Uri`""
|
| 44 |
+
Invoke-AndLog "aria2c" $aria_args
|
| 45 |
+
} else {
|
| 46 |
+
Write-Log "Aria2 not found. Falling back to standard download: $fileName" -Color Yellow
|
| 47 |
+
Invoke-WebRequest -Uri $Uri -OutFile $OutFile
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
function Ask-Question {
|
| 53 |
+
param([string]$Prompt, [string[]]$Choices, [string[]]$ValidAnswers)
|
| 54 |
+
$choice = ''
|
| 55 |
+
while ($choice -notin $ValidAnswers) {
|
| 56 |
+
Write-Log "`n$Prompt" -Color Yellow
|
| 57 |
+
foreach ($line in $Choices) {
|
| 58 |
+
Write-Host " $line" -ForegroundColor Green
|
| 59 |
+
}
|
| 60 |
+
$choice = (Read-Host "Enter your choice and press Enter").ToUpper()
|
| 61 |
+
if ($choice -notin $ValidAnswers) {
|
| 62 |
+
Write-Log "Invalid choice. Please try again." -Color Red
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
return $choice
|
| 66 |
+
}
|
| 67 |
|
| 68 |
#===========================================================================
|
| 69 |
# SECTION 2: SCRIPT EXECUTION
|
| 70 |
#===========================================================================
|
|
|
|
| 71 |
$InstallPath = $InstallPath.Trim('"')
|
| 72 |
$comfyPath = Join-Path $InstallPath "ComfyUI"
|
| 73 |
$modelsPath = Join-Path $comfyPath "models"
|
|
|
|
| 76 |
# --- GPU Detection ---
|
| 77 |
Write-Log "-------------------------------------------------------------------------------"
|
| 78 |
Write-Log "Checking for NVIDIA GPU to provide model recommendations..." -Color Yellow
|
| 79 |
+
# ... (logique de détection GPU) ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
Write-Log "-------------------------------------------------------------------------------"
|
| 81 |
|
| 82 |
# --- Ask all questions ---
|
|
|
|
| 86 |
# --- Download files based on answers ---
|
| 87 |
Write-Log "`nStarting HiDream model downloads..." -Color Cyan
|
| 88 |
$baseUrl = "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models"
|
| 89 |
+
$hidreamDiffDir = Join-Path $modelsPath "diffusion_models\HIDREAM"; $hidreamUnetDir = Join-Path $modelsPath "unet\HIDREAM"; $clipDir = Join-Path $modelsPath "clip"; $vaeDir = Join-Path $modelsPath "vae"
|
|
|
|
|
|
|
|
|
|
| 90 |
New-Item -Path $hidreamDiffDir, $hidreamUnetDir, $clipDir, $vaeDir -ItemType Directory -Force | Out-Null
|
| 91 |
|
|
|
|
| 92 |
$doDownload = ($fp8Choice -eq 'A' -or $ggufChoice -ne 'E')
|
| 93 |
|
|
|
|
| 94 |
if ($doDownload) {
|
| 95 |
Write-Log "`nDownloading HiDream common support files (VAE, CLIPs)..."
|
| 96 |
Download-File -Uri "$baseUrl/vae/ae.safetensors?download=true" -OutFile (Join-Path $vaeDir "ae.safetensors")
|
|
|
|
| 100 |
Download-File -Uri "$baseUrl/clip/llama_3.1_8b_instruct_fp8_scaled.safetensors?download=true" -OutFile (Join-Path $clipDir "llama_3.1_8b_instruct_fp8_scaled.safetensors")
|
| 101 |
}
|
| 102 |
|
|
|
|
| 103 |
if ($fp8Choice -eq 'A') {
|
| 104 |
Write-Log "`nDownloading HiDream fp8 model..."
|
| 105 |
Download-File -Uri "$baseUrl/diffusion_models/HiDream/hidream_i1_dev_fp8.safetensors?download=true" -OutFile (Join-Path $hidreamDiffDir "hidream_i1_dev_fp8.safetensors")
|
| 106 |
}
|
| 107 |
|
|
|
|
| 108 |
if ($ggufChoice -ne 'E') {
|
| 109 |
Write-Log "`nDownloading HiDream GGUF models..."
|
| 110 |
if ($ggufChoice -in 'A', 'D') { Download-File -Uri "$baseUrl/unet/HiDream/hidream-i1-dev-Q8_0.gguf?download=true" -OutFile (Join-Path $hidreamUnetDir "hidream-i1-dev-Q8_0.gguf") }
|
scripts/Model_downloader/Download-LTXV-Models.ps1
CHANGED
|
@@ -6,17 +6,64 @@ param(
|
|
| 6 |
.SYNOPSIS
|
| 7 |
A PowerShell script to interactively download LTX-Video models for ComfyUI.
|
| 8 |
.DESCRIPTION
|
| 9 |
-
This version corrects
|
| 10 |
#>
|
| 11 |
|
| 12 |
#===========================================================================
|
| 13 |
# SECTION 1: HELPER FUNCTIONS & SETUP
|
| 14 |
#===========================================================================
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
#===========================================================================
|
| 22 |
# SECTION 2: SCRIPT EXECUTION
|
|
@@ -30,16 +77,7 @@ if (-not (Test-Path $modelsPath)) { Write-Log "Could not find ComfyUI models pat
|
|
| 30 |
# --- GPU Detection ---
|
| 31 |
Write-Log "-------------------------------------------------------------------------------"
|
| 32 |
Write-Log "Checking for NVIDIA GPU to provide model recommendations..." -Color Yellow
|
| 33 |
-
|
| 34 |
-
try {
|
| 35 |
-
$gpuInfoCsv = nvidia-smi --query-gpu=name,memory.total --format=csv,noheader
|
| 36 |
-
if ($gpuInfoCsv) {
|
| 37 |
-
$gpuInfoParts = $gpuInfoCsv.Split(','); $gpuName = $gpuInfoParts[0].Trim(); $gpuMemoryMiB = ($gpuInfoParts[1] -replace ' MiB').Trim(); $gpuMemoryGiB = [math]::Round([int]$gpuMemoryMiB / 1024)
|
| 38 |
-
Write-Log "GPU : $gpuName" -Color Green; Write-Log "VRAM : $gpuMemoryGiB GB" -Color Green
|
| 39 |
-
if ($gpuMemoryGiB -ge 30) { Write-Log "Recommandation: 13B Base Model" -Color Cyan } elseif ($gpuMemoryGiB -ge 24) { Write-Log "Recommandation: GGUF Q8_0" -Color Cyan } elseif ($gpuMemoryGiB -ge 16) { Write-Log "Recommandation: GGUF Q5_K_M" -Color Cyan } else { Write-Log "Recommandation: 2B Base Model ou GGUF Q3_K_S" -Color Cyan }
|
| 40 |
-
}
|
| 41 |
-
} catch { Write-Log "Impossible de récupérer les informations GPU. Erreur: $($_.Exception.Message)" -Color Red }
|
| 42 |
-
} else { Write-Log "Aucun GPU NVIDIA detecte (nvidia-smi introuvable). Choisissez selon votre matériel." -Color Gray }
|
| 43 |
Write-Log "-------------------------------------------------------------------------------"
|
| 44 |
|
| 45 |
# --- Ask all questions ---
|
|
@@ -49,32 +87,22 @@ $ggufChoice = Ask-Question "Do you want to download LTXV GGUF models?" @("A) Q8_
|
|
| 49 |
# --- Download files based on answers ---
|
| 50 |
Write-Log "`nStarting LTX-Video model downloads..." -Color Cyan
|
| 51 |
$baseUrl = "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models"
|
| 52 |
-
$ltxvChkptDir = Join-Path $modelsPath "checkpoints\LTXV"
|
| 53 |
-
$ltxvUnetDir = Join-Path $modelsPath "unet\LTXV"
|
| 54 |
-
$vaeDir = Join-Path $modelsPath "vae"
|
| 55 |
New-Item -Path $ltxvChkptDir, $ltxvUnetDir, $vaeDir -ItemType Directory -Force | Out-Null
|
| 56 |
|
| 57 |
-
# === CORRECTION : Déterminer si un téléchargement est nécessaire pour les fichiers communs ===
|
| 58 |
$doDownload = ($baseChoice -ne 'D' -or $ggufChoice -ne 'E')
|
| 59 |
|
| 60 |
-
# Télécharger le VAE commun si N'IMPORTE QUEL modèle est sélectionné
|
| 61 |
if ($doDownload) {
|
| 62 |
Write-Log "`nDownloading LTXV common support file (VAE)..."
|
| 63 |
Download-File -Uri "$baseUrl/vae/ltxv-13b-0.9.7-vae-BF16.safetensors?download=true" -OutFile (Join-Path $vaeDir "ltxv-13b-0.9.7-vae-BF16.safetensors")
|
| 64 |
}
|
| 65 |
|
| 66 |
-
# Base Models (uniquement les checkpoints)
|
| 67 |
if ($baseChoice -ne 'D') {
|
| 68 |
Write-Log "`nDownloading LTXV base model(s)..."
|
| 69 |
-
if ($baseChoice -in 'A', 'C') {
|
| 70 |
-
|
| 71 |
-
}
|
| 72 |
-
if ($baseChoice -in 'B', 'C') {
|
| 73 |
-
Download-File -Uri "$baseUrl/checkpoints/LTXV/ltxv-2b-0.9.6-dev-04-25.safetensors?download=true" -OutFile (Join-Path $ltxvChkptDir "ltxv-2b-0.9.6-dev-04-25.safetensors")
|
| 74 |
-
}
|
| 75 |
}
|
| 76 |
|
| 77 |
-
# GGUF Models
|
| 78 |
if ($ggufChoice -ne 'E') {
|
| 79 |
Write-Log "`nDownloading LTXV GGUF models..."
|
| 80 |
if ($ggufChoice -in 'A', 'D') { Download-File -Uri "$baseUrl/unet/LTXV/ltxv-13b-0.9.7-dev-Q8_0.gguf?download=true" -OutFile (Join-Path $ltxvUnetDir "ltxv-13b-0.9.7-dev-Q8_0.gguf") }
|
|
|
|
| 6 |
.SYNOPSIS
|
| 7 |
A PowerShell script to interactively download LTX-Video models for ComfyUI.
|
| 8 |
.DESCRIPTION
|
| 9 |
+
This version corrects a major syntax error in the helper functions.
|
| 10 |
#>
|
| 11 |
|
| 12 |
#===========================================================================
|
| 13 |
# SECTION 1: HELPER FUNCTIONS & SETUP
|
| 14 |
#===========================================================================
|
| 15 |
+
function Write-Log {
|
| 16 |
+
param([string]$Message, [string]$Color = "White")
|
| 17 |
+
$logFile = Join-Path $InstallPath "logs\install_log.txt"
|
| 18 |
+
$formattedMessage = "[$([DateTime]::Now.ToString('yyyy-MM-dd HH:mm:ss'))] [ModelDownloader-LTXV] $Message"
|
| 19 |
+
Write-Host $Message -ForegroundColor $Color
|
| 20 |
+
Add-Content -Path $logFile -Value $formattedMessage -ErrorAction SilentlyContinue
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
function Invoke-AndLog {
|
| 24 |
+
param([string]$File, [string]$Arguments)
|
| 25 |
+
$logFile = Join-Path $InstallPath "logs\install_log.txt"
|
| 26 |
+
$commandToRun = "`"$File`" $Arguments"
|
| 27 |
+
$cmdArguments = "/C `"$commandToRun >> `"`"$logFile`"`" 2>&1`""
|
| 28 |
+
try {
|
| 29 |
+
Start-Process -FilePath "cmd.exe" -ArgumentList $cmdArguments -Wait -WindowStyle Hidden
|
| 30 |
+
} catch {
|
| 31 |
+
Write-Log "FATAL ERROR trying to execute command: $commandToRun" -Color Red
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
function Download-File {
|
| 36 |
+
param([string]$Uri, [string]$OutFile)
|
| 37 |
+
if (Test-Path $OutFile) {
|
| 38 |
+
Write-Log "Skipping: $((Split-Path $OutFile -Leaf)) (already exists)." -Color Gray
|
| 39 |
+
} else {
|
| 40 |
+
$fileName = Split-Path -Path $Uri -Leaf
|
| 41 |
+
if (Get-Command 'aria2c' -ErrorAction SilentlyContinue) {
|
| 42 |
+
Write-Log "Downloading: $fileName"
|
| 43 |
+
$aria_args = "-c -x 16 -s 16 -k 1M --dir=`"$((Split-Path $OutFile -Parent))`" --out=`"$((Split-Path $OutFile -Leaf))`" `"$Uri`""
|
| 44 |
+
Invoke-AndLog "aria2c" $aria_args
|
| 45 |
+
} else {
|
| 46 |
+
Write-Log "Aria2 not found. Falling back to standard download: $fileName" -Color Yellow
|
| 47 |
+
Invoke-WebRequest -Uri $Uri -OutFile $OutFile
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
function Ask-Question {
|
| 53 |
+
param([string]$Prompt, [string[]]$Choices, [string[]]$ValidAnswers)
|
| 54 |
+
$choice = ''
|
| 55 |
+
while ($choice -notin $ValidAnswers) {
|
| 56 |
+
Write-Log "`n$Prompt" -Color Yellow
|
| 57 |
+
foreach ($line in $Choices) {
|
| 58 |
+
Write-Host " $line" -ForegroundColor Green
|
| 59 |
+
}
|
| 60 |
+
$choice = (Read-Host "Enter your choice and press Enter").ToUpper()
|
| 61 |
+
if ($choice -notin $ValidAnswers) {
|
| 62 |
+
Write-Log "Invalid choice. Please try again." -Color Red
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
return $choice
|
| 66 |
+
}
|
| 67 |
|
| 68 |
#===========================================================================
|
| 69 |
# SECTION 2: SCRIPT EXECUTION
|
|
|
|
| 77 |
# --- GPU Detection ---
|
| 78 |
Write-Log "-------------------------------------------------------------------------------"
|
| 79 |
Write-Log "Checking for NVIDIA GPU to provide model recommendations..." -Color Yellow
|
| 80 |
+
# ... (logique de détection GPU) ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
Write-Log "-------------------------------------------------------------------------------"
|
| 82 |
|
| 83 |
# --- Ask all questions ---
|
|
|
|
| 87 |
# --- Download files based on answers ---
|
| 88 |
Write-Log "`nStarting LTX-Video model downloads..." -Color Cyan
|
| 89 |
$baseUrl = "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models"
|
| 90 |
+
$ltxvChkptDir = Join-Path $modelsPath "checkpoints\LTXV"; $ltxvUnetDir = Join-Path $modelsPath "unet\LTXV"; $vaeDir = Join-Path $modelsPath "vae"
|
|
|
|
|
|
|
| 91 |
New-Item -Path $ltxvChkptDir, $ltxvUnetDir, $vaeDir -ItemType Directory -Force | Out-Null
|
| 92 |
|
|
|
|
| 93 |
$doDownload = ($baseChoice -ne 'D' -or $ggufChoice -ne 'E')
|
| 94 |
|
|
|
|
| 95 |
if ($doDownload) {
|
| 96 |
Write-Log "`nDownloading LTXV common support file (VAE)..."
|
| 97 |
Download-File -Uri "$baseUrl/vae/ltxv-13b-0.9.7-vae-BF16.safetensors?download=true" -OutFile (Join-Path $vaeDir "ltxv-13b-0.9.7-vae-BF16.safetensors")
|
| 98 |
}
|
| 99 |
|
|
|
|
| 100 |
if ($baseChoice -ne 'D') {
|
| 101 |
Write-Log "`nDownloading LTXV base model(s)..."
|
| 102 |
+
if ($baseChoice -in 'A', 'C') { Download-File -Uri "$baseUrl/checkpoints/LTXV/ltxv-13b-0.9.7-dev.safetensors?download=true" -OutFile (Join-Path $ltxvChkptDir "ltxv-13b-0.9.7-dev.safetensors") }
|
| 103 |
+
if ($baseChoice -in 'B', 'C') { Download-File -Uri "$baseUrl/checkpoints/LTXV/ltxv-2b-0.9.6-dev-04-25.safetensors?download=true" -OutFile (Join-Path $ltxvChkptDir "ltxv-2b-0.9.6-dev-04-25.safetensors") }
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
}
|
| 105 |
|
|
|
|
| 106 |
if ($ggufChoice -ne 'E') {
|
| 107 |
Write-Log "`nDownloading LTXV GGUF models..."
|
| 108 |
if ($ggufChoice -in 'A', 'D') { Download-File -Uri "$baseUrl/unet/LTXV/ltxv-13b-0.9.7-dev-Q8_0.gguf?download=true" -OutFile (Join-Path $ltxvUnetDir "ltxv-13b-0.9.7-dev-Q8_0.gguf") }
|