Run this model with HF Jobs
Run UmeAiRT/ComfyUI-Auto-Installer-Assets on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/UmeAiRT/ComfyUI-Auto-Installer-Assets. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/UmeAiRT/ComfyUI-Auto-Installer-Assets on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use UmeAiRT/ComfyUI-Auto-Installer-Assets with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use UmeAiRT/ComfyUI-Auto-Installer-Assets with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("UmeAiRT/ComfyUI-Auto-Installer-Assets", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Upload Download-FLUX-Models.ps1
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949551 unmodified lines14714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817922 unmodified lines20220320420520620720820921021121221321421520 unmodified lines236237238239240241242243244245246247248249250251<#.SYNOPSISA PowerShell script to interactively download FLUX models for ComfyUI..DESCRIPTIONThis script replaces the UmeAiRT-Model_downloader-FLUX-Auto.bat file.It provides a series of prompts to the user to select which specific FLUX modelsthey wish to download, then downloads them using the provided helper functions.#>#===========================================================================# SECTION 1: HELPER FUNCTIONS & SETUP#===========================================================================# --- Helper function to write to console and log file ---function Write-Log {param([string]$Message, [string]$Color = "White")$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"# Note: Log file path assumes it's run from the main installer's directory$logFile = Join-Path $PSScriptRoot "logs\install_log.txt"$formattedMessage = "[$timestamp] [ModelDownloader] $Message"Write-Host $Message -ForegroundColor $ColorAdd-Content -Path $logFile -Value $formattedMessage}# --- Helper function to execute a command and log its output ---function Invoke-AndLog {param([string]$File, [string]$Arguments)$logFile = Join-Path $PSScriptRoot "logs\install_log.txt"$commandToRun = "`"$File`" $Arguments"$cmdArguments = "/C `"$commandToRun >> `"`"$logFile`"`" 2>&1`""try {Start-Process -FilePath "cmd.exe" -ArgumentList $cmdArguments -Wait -WindowStyle Hidden} catch {Write-Log "FATAL ERROR trying to execute command: $commandToRun" -Color Red}}# --- Smart Download Function ---function Download-File {param([string]$Uri,[string]$OutFile)# Vérifie si le fichier de destination existe déjàif (Test-Path $OutFile) {Write-Log "Skipping: $((Split-Path $OutFile -Leaf)) (already exists)." -Color Gray} else {# Si le fichier n'existe pas, on procède au téléchargement$fileName = Split-Path -Path $Uri -Leafif (Get-Command 'aria2c' -ErrorAction SilentlyContinue) {Write-Log "Downloading: $fileName"$aria_args = "-c -x 16 -s 16 -k 1M --dir=`"$((Split-Path $OutFile -Parent))`" --out=`"$((Split-Path $OutFile -Leaf))`" `"$Uri`""Invoke-AndLog "aria2c" $aria_args} else {Write-Log "Aria2 not found. Falling back to standard download: $fileName" -Color YellowInvoke-WebRequest -Uri $Uri -OutFile $OutFile}}}# --- Function to ask a multiple choice question ---function Ask-Question {param([string]$Prompt,[string[]]$Choices,[string[]]$ValidAnswers)$choice = ''while ($choice -notin $ValidAnswers) {Write-Log "`n$Prompt" -Color Yellowforeach ($line in $Choices) {Write-Host " $line" -ForegroundColor Green}$choice = (Read-Host "Enter your choice and press Enter").ToUpper()if ($choice -notin $ValidAnswers) {Write-Log "Invalid choice. Please try again." -Color Red}}return $choice}#===========================================================================# SECTION 2: SCRIPT EXECUTION#===========================================================================# --- Path Detection ---$installPath = $PSScriptRoot$basePath = Join-Path $installPath "ComfyUI_windows_portable"if (-not (Test-Path $basePath)) {$basePath = $installPath}$modelsPath = Join-Path $basePath "ComfyUI\models"if (-not (Test-Path $modelsPath)) {51 unmodified lines$loraChoice = Ask-Question -Prompt "Do you want to download UmeAiRT LoRAs?" -Choices @("A) Yes", "B) No") -ValidAnswers @("A", "B")# --- Download files based on answers ---$baseUrl = "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models"# FLUX Base Modelsif ($fluxChoice -in @("A", "C")) {$destDir = Join-Path $modelsPath "diffusion_models\FLUX"; New-Item -Path $destDir -ItemType Directory -Force | Out-Null$clipDir = Join-Path $modelsPath "clip"; New-Item -Path $clipDir -ItemType Directory -Force | Out-NullDownload-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-dev-fp16.safetensors" -OutFile (Join-Path $destDir "flux1-dev-fp16.safetensors")Download-File -Uri "$baseUrl/clip/t5xxl_fp16.safetensors" -OutFile (Join-Path $clipDir "t5xxl_fp16.safetensors")}if ($fluxChoice -in @("B", "C")) {$destDir = Join-Path $modelsPath "diffusion_models\FLUX"; New-Item -Path $destDir -ItemType Directory -Force | Out-Null$clipDir = Join-Path $modelsPath "clip"; New-Item -Path $clipDir -ItemType Directory -Force | Out-NullDownload-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-dev-fp8.safetensors" -OutFile (Join-Path $destDir "flux1-dev-fp8.safetensors")Download-File -Uri "$baseUrl/clip/t5xxl_fp8_e4m3fn.safetensors" -OutFile (Join-Path $clipDir "t5xxl_fp8_e4m3fn.safetensors")}# Common files (VAE, CLIPs) - Downloaded if any main option was chosen$destDir = Join-Path $modelsPath "vae"; New-Item -Path $destDir -ItemType Directory -Force | Out-NullDownload-File -Uri "$baseUrl/vae/ae.safetensors" -OutFile (Join-Path $destDir "ae.safetensors")$destDir = Join-Path $modelsPath "clip"; New-Item -Path $destDir -ItemType Directory -Force | Out-NullDownload-File -Uri "$baseUrl/clip/clip_l.safetensors" -OutFile (Join-Path $destDir "clip_l.safetensors")# GGUF Modelsif ($ggufChoice -ne 'H') {$unetDir = Join-Path $modelsPath "unet\FLUX"; New-Item -Path $unetDir -ItemType Directory -Force | Out-Null$clipDir = Join-Path $modelsPath "clip"; New-Item -Path $clipDir -ItemType Directory -Force | Out-Nullif ($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 $unetDir "flux1-dev-Q8_0.gguf")22 unmodified lines# Schnell Modelif ($schnellChoice -ne 'G') {$destDir = Join-Path $modelsPath "diffusion_models\FLUX"; New-Item -Path $destDir -ItemType Directory -Force | Out-NullDownload-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-schnell-fp8.safetensors" -OutFile (Join-Path $destDir "flux1-schnell-fp8.safetensors")}# ControlNet Modelsif ($controlnetChoice -eq 'A') {$destDir = Join-Path $modelsPath "xlabs\controlnets"; New-Item -Path $destDir -ItemType Directory -Force | Out-Null$unetDir = Join-Path $modelsPath "unet\FLUX"; New-Item -Path $unetDir -ItemType Directory -Force | Out-NullDownload-File -Uri "$baseUrl/xlabs/controlnets/flux-canny-controlnet-v3.safetensors" -OutFile (Join-Path $destDir "flux-canny-controlnet-v3.safetensors")Download-File -Uri "$baseUrl/xlabs/controlnets/flux-depth-controlnet-v3.safetensors" -OutFile (Join-Path $destDir "flux-depth-controlnet-v3.safetensors")if ($controlnetChoice -in @("A", "F")) {20 unmodified lines# PuLID Modelsif ($pulidChoice -eq 'A') {$destDir = Join-Path $modelsPath "pulid"; New-Item -Path $destDir -ItemType Directory -Force | Out-NullDownload-File -Uri "$baseUrl/pulid/pulid_flux_v0.9.0.safetensors" -OutFile (Join-Path $destDir "pulid_flux_v0.9.0.safetensors")$destDir = Join-Path $modelsPath "style_models"; New-Item -Path $destDir -ItemType Directory -Force | Out-NullDownload-File -Uri "$baseUrl/style_models/flux1-redux-dev.safetensors" -OutFile (Join-Path $destDir "flux1-redux-dev.safetensors")}# LoRA Modelsif ($loraChoice -eq 'A') {$destDir = Join-Path $modelsPath "loras\FLUX"; New-Item -Path $destDir -ItemType Directory -Force | Out-NullDownload-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Ume_Sky/resolve/main/ume_sky_v2.safetensors" -OutFile (Join-Path $destDir "ume_sky_v2.safetensors")Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Modern_Pixel_art/resolve/main/ume_modern_pixelart.safetensors" -OutFile (Join-Path $destDir "ume_modern_pixelart.safetensors")Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Romanticism/resolve/main/ume_classic_Romanticism.safetensors" -OutFile (Join-Path $destDir "ume_classic_Romanticism.safetensors")123456789101112131415161718192021222324252627282930313233343551 unmodified lines8788899091929394959697989910010110210310410510610710810911011111211311411511622 unmodified lines13914014114214314414514614714814920 unmodified lines170171172173174175176177178179180181param(# Accepte le chemin d'installation du script principal.# Par défaut, utilise son propre dossier s'il est lancé seul.[string]$InstallPath = $PSScriptRoot)<#.SYNOPSISA fully refactored and corrected PowerShell script to interactively download FLUX models for ComfyUI..DESCRIPTIONThis version corrects pathing issues, download logic, and optimizes directory creation.#>#===========================================================================# SECTION 1: HELPER FUNCTIONS & SETUP#===========================================================================function Write-Log { param([string]$Message, [string]$Color = "White") { $logFile = Join-Path (Split-Path $MyInvocation.MyCommand.Path -Parent) "logs\install_log.txt"; $formattedMessage = "[$([DateTime]::Now.ToString('yyyy-MM-dd HH:mm:ss'))] [ModelDownloader] $Message"; Write-Host $Message -ForegroundColor $Color; Add-Content -Path $logFile -Value $formattedMessage; } }function Invoke-AndLog { param([string]$File, [string]$Arguments) { $logFile = Join-Path (Split-Path $MyInvocation.MyCommand.Path -Parent) "logs\install_log.txt"; $commandToRun = "`"$File`" $Arguments"; $cmdArguments = "/C `"$commandToRun >> `"`"$logFile`"`" 2>&1`""; try { Start-Process -FilePath "cmd.exe" -ArgumentList $cmdArguments -Wait -WindowStyle Hidden } catch { Write-Log "FATAL ERROR trying to execute command: $commandToRun" -Color Red } } }function Download-File { param([string]$Uri, [string]$OutFile) { if (Test-Path $OutFile) { Write-Log "Skipping: $((Split-Path $OutFile -Leaf)) (already exists)." -Color Gray } else { $fileName = Split-Path -Path $Uri -Leaf; if (Get-Command 'aria2c' -ErrorAction SilentlyContinue) { Write-Log "Downloading: $fileName"; $aria_args = "-c -x 16 -s 16 -k 1M --dir=`"$((Split-Path $OutFile -Parent))`" --out=`"$((Split-Path $OutFile -Leaf))`" `"$Uri`""; Invoke-AndLog "aria2c" $aria_args } else { Write-Log "Aria2 not found. Falling back to standard download: $fileName" -Color Yellow; Invoke-WebRequest -Uri $Uri -OutFile $OutFile } } } }function Ask-Question { param([string]$Prompt, [string[]]$Choices, [string[]]$ValidAnswers) { $choice = ''; while ($choice -notin $ValidAnswers) { Write-Log "`n$Prompt" -Color Yellow; foreach ($line in $Choices) { Write-Host " $line" -ForegroundColor Green }; $choice = (Read-Host "Enter your choice and press Enter").ToUpper(); if ($choice -notin $ValidAnswers) { Write-Log "Invalid choice. Please try again." -Color Red } }; return $choice } }#===========================================================================# SECTION 2: SCRIPT EXECUTION#===========================================================================# --- Path Detection ---# On nettoie le chemin reçu en argument et on l'utilise$InstallPath = $InstallPath.Trim('"')$basePath = Join-Path $InstallPath "ComfyUI_windows_portable"if (-not (Test-Path $basePath)) {$basePath = $InstallPath}$modelsPath = Join-Path $basePath "ComfyUI\models"if (-not (Test-Path $modelsPath)) {51 unmodified lines$loraChoice = Ask-Question -Prompt "Do you want to download UmeAiRT LoRAs?" -Choices @("A) Yes", "B) No") -ValidAnswers @("A", "B")# --- Download files based on answers ---# --- Create all needed directories once ---Write-Log "`nPreparing model directories..." -Color Cyan$requiredDirs = @("vae", "clip", "diffusion_models/FLUX", "unet/FLUX", "xlabs/controlnets", "pulid", "style_models", "loras/FLUX")foreach ($subDir in $requiredDirs) {New-Item -Path (Join-Path $modelsPath $subDir) -ItemType Directory -Force | Out-Null}$baseUrl = "https://huggingface.co/UmeAiRT/ComfyUI-Auto_installer/resolve/main/models"# FLUX Base Modelsif ($fluxChoice -in @("A", "C")) {Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-dev-fp16.safetensors" -OutFile (Join-Path $destDir "flux1-dev-fp16.safetensors")Download-File -Uri "$baseUrl/clip/t5xxl_fp16.safetensors" -OutFile (Join-Path $clipDir "t5xxl_fp16.safetensors")}if ($fluxChoice -in @("B", "C")) {Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-dev-fp8.safetensors" -OutFile (Join-Path $destDir "flux1-dev-fp8.safetensors")Download-File -Uri "$baseUrl/clip/t5xxl_fp8_e4m3fn.safetensors" -OutFile (Join-Path $clipDir "t5xxl_fp8_e4m3fn.safetensors")}# Common files (VAE, CLIPs) - Downloaded if any main option was chosenDownload-File -Uri "$baseUrl/vae/ae.safetensors" -OutFile (Join-Path $destDir "ae.safetensors")Download-File -Uri "$baseUrl/clip/clip_l.safetensors" -OutFile (Join-Path $destDir "clip_l.safetensors")# GGUF Modelsif ($ggufChoice -ne 'H') {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 $unetDir "flux1-dev-Q8_0.gguf")22 unmodified lines# Schnell Modelif ($schnellChoice -ne 'G') {Download-File -Uri "$baseUrl/diffusion_models/FLUX/flux1-schnell-fp8.safetensors" -OutFile (Join-Path $destDir "flux1-schnell-fp8.safetensors")}# ControlNet Modelsif ($controlnetChoice -eq 'A') {Download-File -Uri "$baseUrl/xlabs/controlnets/flux-canny-controlnet-v3.safetensors" -OutFile (Join-Path $destDir "flux-canny-controlnet-v3.safetensors")Download-File -Uri "$baseUrl/xlabs/controlnets/flux-depth-controlnet-v3.safetensors" -OutFile (Join-Path $destDir "flux-depth-controlnet-v3.safetensors")if ($controlnetChoice -in @("A", "F")) {20 unmodified lines# PuLID Modelsif ($pulidChoice -eq 'A') {Download-File -Uri "$baseUrl/pulid/pulid_flux_v0.9.0.safetensors" -OutFile (Join-Path $destDir "pulid_flux_v0.9.0.safetensors")Download-File -Uri "$baseUrl/style_models/flux1-redux-dev.safetensors" -OutFile (Join-Path $destDir "flux1-redux-dev.safetensors")}# LoRA Modelsif ($loraChoice -eq 'A') {Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Ume_Sky/resolve/main/ume_sky_v2.safetensors" -OutFile (Join-Path $destDir "ume_sky_v2.safetensors")Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Modern_Pixel_art/resolve/main/ume_modern_pixelart.safetensors" -OutFile (Join-Path $destDir "ume_modern_pixelart.safetensors")Download-File -Uri "https://huggingface.co/UmeAiRT/FLUX.1-dev-LoRA-Romanticism/resolve/main/ume_classic_Romanticism.safetensors" -OutFile (Join-Path $destDir "ume_classic_Romanticism.safetensors")
scripts/Model_downloader/Download-FLUX-Models.ps1+22-92