feat: downloader for Qwen-Image weights, switch-model.sh script
Two frontier tickets from the ComfyUI map (#38), both unblocked now that their blockers (#39 model choice, #40 lazytainer research) are resolved. - downloader-comfyui service (docker-compose.yml) + COMFYUI_* vars (.env.example): fetches Qwen-Image FP8 diffusion/text-encoder/VAE weights from Comfy-Org/Qwen-Image_ComfyUI, same test -f guard pattern as the existing downloaders. Closes #42. - scripts/switch-model.sh: swaps GPU residency between llama-server and comfyui via direct `docker compose stop`/`up -d`, bypassing lazytainer per docs/research/lazytainer-omniroute-idle-stop.md (its packet-threshold detector can't distinguish OmniRoute's health checks from real traffic, so idle-stop can't be relied on for a deliberate swap). llama-server-fast stays resident throughout — not part of this swap. Closes #43. - scripts/update.sh: runs the new downloader profile. docker compose config -q validated clean. Refs #38, #42, #43 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MrnMEdzeQzqZE5soVEXPCx
This commit is contained in:
@@ -116,6 +116,39 @@ services:
|
||||
curl -L --fail --create-dirs -o /models/${LLAMA_FAST_MODEL_FILE:-Qwen3-4B-Instruct-2507-UD-Q8_K_XL.gguf}
|
||||
https://huggingface.co/unsloth/Qwen3-4B-Instruct-2507-GGUF/resolve/main/${LLAMA_FAST_MODEL_FILE:-Qwen3-4B-Instruct-2507-UD-Q8_K_XL.gguf}
|
||||
|
||||
# Fetches the three Qwen-Image FP8 files ComfyUI needs (diffusion model,
|
||||
# text encoder, VAE) — same test -f guard pattern as downloader/
|
||||
# downloader-fast above. See docs/research/image-generation-model-choice.md
|
||||
# and issue #42.
|
||||
#
|
||||
# ponytail: target paths assume ComfyUI's standard models/ layout under
|
||||
# BASE_STORAGE_PATH (/storage) — same "not independently confirmed against
|
||||
# the image's Dockerfile" caveat already flagged on the comfyui service
|
||||
# below. If ComfyUI doesn't pick these up, check its actual models root
|
||||
# first.
|
||||
downloader-comfyui:
|
||||
image: curlimages/curl:latest
|
||||
profiles: ["tools"]
|
||||
user: root
|
||||
volumes:
|
||||
- comfyui-data:/storage
|
||||
entrypoint: ["sh", "-c"]
|
||||
command:
|
||||
- >
|
||||
mkdir -p /storage/models/diffusion_models /storage/models/text_encoders /storage/models/vae &&
|
||||
(test -f /storage/models/diffusion_models/${COMFYUI_DIFFUSION_MODEL_FILE:-qwen_image_fp8_e4m3fn.safetensors} &&
|
||||
echo "diffusion model already downloaded, skipping" ||
|
||||
curl -L --fail --create-dirs -o /storage/models/diffusion_models/${COMFYUI_DIFFUSION_MODEL_FILE:-qwen_image_fp8_e4m3fn.safetensors}
|
||||
https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/diffusion_models/${COMFYUI_DIFFUSION_MODEL_FILE:-qwen_image_fp8_e4m3fn.safetensors}) &&
|
||||
(test -f /storage/models/text_encoders/${COMFYUI_TEXT_ENCODER_FILE:-qwen_2.5_vl_7b_fp8_scaled.safetensors} &&
|
||||
echo "text encoder already downloaded, skipping" ||
|
||||
curl -L --fail --create-dirs -o /storage/models/text_encoders/${COMFYUI_TEXT_ENCODER_FILE:-qwen_2.5_vl_7b_fp8_scaled.safetensors}
|
||||
https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/text_encoders/${COMFYUI_TEXT_ENCODER_FILE:-qwen_2.5_vl_7b_fp8_scaled.safetensors}) &&
|
||||
(test -f /storage/models/vae/${COMFYUI_VAE_FILE:-qwen_image_vae.safetensors} &&
|
||||
echo "vae already downloaded, skipping" ||
|
||||
curl -L --fail --create-dirs -o /storage/models/vae/${COMFYUI_VAE_FILE:-qwen_image_vae.safetensors}
|
||||
https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/${COMFYUI_VAE_FILE:-qwen_image_vae.safetensors})
|
||||
|
||||
# Local image generation — see issue #38 (wayfinder map). yurisasc's image
|
||||
# is gfx1201-tuned specifically (R9700's arch), unlike the official/AMD
|
||||
# ComfyUI image which doesn't pin RDNA4 support — see
|
||||
|
||||
Reference in New Issue
Block a user