From 6639fae0e9fd8b27c0e608e7cae53a73193db479 Mon Sep 17 00:00:00 2001 From: donny Date: Mon, 18 May 2026 21:10:57 -0700 Subject: [PATCH] Prefetch TAESD-XL + SDXL VAE from HuggingFace at startup So live previews and the common SDXL VAE override are available without manually downloading each time the pod starts. Co-Authored-By: Claude Opus 4.7 (1M context) --- startup.sh | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) 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 - <