Add comfyui-model-init sidecar for ComfyUI model preseeding
Mirrors the Ollama model-init pattern: a one-shot Alpine container that mounts the comfyui-models volume and runs comfyui-init-models.sh, which curls direct download URLs (HuggingFace by default) into the right subdirectories. Idempotent — already-present files are skipped. HF_TOKEN is plumbed through for gated repos (Flux-dev, SD3, etc.) and is opt-in via .env. The default list ships SD 1.5 only, matching the placeholder filename in workflows/*.json. Examples for SDXL, Flux, and upscalers are commented in the script. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
21e976e275
commit
0ad99b6199
4 files changed
+115
-19
No files matched your search
@@ -10,12 +10,13 @@ production `srvno.de` deployment.
|
||||
|
||||
## Files
|
||||
|
||||
| File | Purpose |
|
||||
| ------------------- | -------------------------------------------------------- |
|
||||
| `docker-compose.yml`| Service definitions, volumes, GPU reservations |
|
||||
| `Caddyfile` | TLS + reverse proxy config (one site block per hostname) |
|
||||
| `init-models.sh` | Models to preseed into Ollama on first boot |
|
||||
| `.env.example` | Secrets and image-tag pins. Copy to `.env` |
|
||||
| File | Purpose |
|
||||
| -------------------------- | -------------------------------------------------------- |
|
||||
| `docker-compose.yml` | Service definitions, volumes, GPU reservations |
|
||||
| `Caddyfile` | TLS + reverse proxy config (one site block per hostname) |
|
||||
| `init-models.sh` | LLMs to preseed into Ollama on first boot |
|
||||
| `comfyui-init-models.sh` | Checkpoints/VAEs/LoRAs to preseed into ComfyUI on first boot |
|
||||
| `.env.example` | Secrets and image-tag pins. Copy to `.env` |
|
||||
|
||||
## 1. Host prerequisites
|
||||
|
||||
@@ -61,6 +62,10 @@ Then edit:
|
||||
- **`init-models.sh`** — keep the LLMs you want preseeded, drop the rest.
|
||||
Check sizes at <https://ollama.com/library> first; the host needs disk
|
||||
for everything listed.
|
||||
- **`comfyui-init-models.sh`** — checkpoints/VAEs/LoRAs to preseed into
|
||||
ComfyUI. Default ships SD 1.5 only (matches the workflow placeholder).
|
||||
Uncomment the SDXL/Flux/upscaler examples or add your own. Set `HF_TOKEN`
|
||||
in `.env` if any are gated repos.
|
||||
|
||||
## 3. Bring it up
|
||||
|
||||
@@ -80,22 +85,26 @@ docker compose exec comfyui curl -sf http://127.0.0.1:8188/system_stats | head -
|
||||
docker compose exec open-webui curl -sf http://127.0.0.1:8080/health
|
||||
```
|
||||
|
||||
## 4. Drop in at least one ComfyUI checkpoint
|
||||
## 4. ComfyUI checkpoints
|
||||
|
||||
ComfyUI ships no models. The shipped workflow templates reference
|
||||
`v1-5-pruned-emaonly.safetensors` as a placeholder; drop any
|
||||
SD/SDXL/Flux checkpoint into the `comfyui-models` volume under
|
||||
`checkpoints/`:
|
||||
ComfyUI ships no models. Three ways to get one in:
|
||||
|
||||
```sh
|
||||
docker run --rm -v ai-stack_comfyui-models:/models -w /models/checkpoints \
|
||||
curlimages/curl:latest -L -O \
|
||||
https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors
|
||||
```
|
||||
1. **Preseed via the sidecar (default).** `comfyui-model-init` runs once
|
||||
on `compose up`, downloads everything `comfyui-init-models.sh` lists,
|
||||
and exits. The default list pulls SD 1.5 to match the workflow
|
||||
placeholder. Edit the script to add SDXL, Flux, LoRAs, upscalers, etc.
|
||||
Re-run with `docker compose up -d comfyui-model-init` after edits;
|
||||
already-present files are skipped.
|
||||
2. **ComfyUI-Manager UI.** Open `https://comfyui.example.com` (after
|
||||
basic-auth login), click **Manager**, then **Model Manager**, install
|
||||
from the catalogue.
|
||||
3. **Direct copy into the volume.** Useful if you already have the file
|
||||
locally:
|
||||
|
||||
Or open the ComfyUI native UI at `https://comfyui.example.com` (after
|
||||
basic-auth login), use the **Manager** button (added by ComfyUI-Manager),
|
||||
and install one through **Model Manager**.
|
||||
```sh
|
||||
docker run --rm -v ai-stack_comfyui-models:/models -v $PWD:/src alpine \
|
||||
cp /src/your-model.safetensors /models/checkpoints/
|
||||
```
|
||||
|
||||
## 5. First-user signup in Open WebUI
|
||||
|
||||
|
||||
Reference in new issue
Block a user