Native systemd install (matches Ollama pattern on Arch — Docker on mRock has no nvidia runtime; native venv via uv is the lighter path). The Black-Forest-Labs FLUX.1-schnell HF repo is gated, so the download script points at ungated mirrors (Comfy-Org/flux1-schnell + sirorable/flux-ae-vae) that ship the same Apache-2.0 weights. First image — cat in a fishbowl, 1024x1024, 4 steps — generated end-to-end in 9.79s via curl + workflow JSON; stored at /home/m/dev/ImaGen/poc/first-image.png on mRiver (not committed; transient PoC artefact). Go adapter is phase 2.
38 lines
1.2 KiB
Bash
Executable File
38 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# Download FLUX.1 schnell + accompanying VAE/text encoders into a ComfyUI tree.
|
|
# Uses ungated mirrors — the official Black-Forest-Labs repo is gated and
|
|
# requires an HF token. See docs/setup-comfyui-mrock.md.
|
|
|
|
set -euo pipefail
|
|
|
|
ROOT="${1:-$HOME/dev/comfyui/models}"
|
|
|
|
if [ ! -d "$ROOT" ]; then
|
|
echo "models root $ROOT does not exist — pass it as the first argument" >&2
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p "$ROOT/unet" "$ROOT/vae" "$ROOT/clip"
|
|
|
|
CKPT="https://huggingface.co/Comfy-Org/flux1-schnell/resolve/main/flux1-schnell.safetensors"
|
|
VAE="https://huggingface.co/sirorable/flux-ae-vae/resolve/main/ae.safetensors"
|
|
CLIP_L="https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/clip_l.safetensors"
|
|
T5="https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn.safetensors"
|
|
|
|
dl() {
|
|
local url=$1 dest=$2
|
|
if [ -s "$dest" ]; then
|
|
echo "skip $dest (already present)"
|
|
return
|
|
fi
|
|
echo "downloading $url -> $dest"
|
|
curl -L --fail --retry 3 --retry-delay 5 -C - -o "$dest" "$url"
|
|
}
|
|
|
|
dl "$CKPT" "$ROOT/unet/flux1-schnell.safetensors"
|
|
dl "$VAE" "$ROOT/vae/ae.safetensors"
|
|
dl "$CLIP_L" "$ROOT/clip/clip_l.safetensors"
|
|
dl "$T5" "$ROOT/clip/t5xxl_fp8_e4m3fn.safetensors"
|
|
|
|
echo "done"
|