diff --git a/startup.sh b/startup.sh index c144f5c..f7ad3a3 100755 --- a/startup.sh +++ b/startup.sh @@ -136,6 +136,50 @@ print("BRIA RMBG-1.4 downloaded") PY } +# ---------------------------------------------------------------------------- +# TAESD preview decoder + SDXL VAE — pulled from HuggingFace (the CivitAI +# auto-download path can't reach them). TAESD is what `--preview-method taesd` +# needs to stream live preview frames as the sampler runs; the SDXL VAE is +# the common override most users want available without a manual download. +# ---------------------------------------------------------------------------- +download_hf_models() { + local vae_approx="$COMFYUI_DIR/models/vae_approx" + local vae_dir="$COMFYUI_DIR/models/vae" + mkdir -p "$vae_approx" "$vae_dir" + + if [ -f "$vae_approx/taesdxl_decoder.safetensors" ] && [ -f "$vae_dir/sdxl_vae.safetensors" ]; then + log_info "TAESD-XL + SDXL VAE already present" + return + fi + + log_step "Downloading TAESD-XL + SDXL VAE from HuggingFace" + python3 - <