ComfyUI docs: reflect the running GPU (gfx1151) container

Rewrite ComfyUI.md to match reality: comfyui-rocm:gfx1151 built from
Containerfile.comfyui on AMD's gfx1151 base, device passthrough, video group
only (render is unmappable in rootless), data under /home/dank/comfyui-data,
boot-persistent via a user systemd unit. Mark research 'way 1' as applied and
update the repo-consequence section (the CPU config is no longer the default).
This commit is contained in:
Frank committed 2026-08-19 16:16:50 -07:00
1 parent bb188becb0
commit a6b3d4a522
2 files changed
+39 -32

No files matched your search

+36 -29
View File
@@ -2,57 +2,64 @@
ComfyUI is a node-based AI image generation engine. Workflows are built from nodes that load models, sample latents, and post-process images; everything is scriptable through a web UI and an API. ComfyUI is a node-based AI image generation engine. Workflows are built from nodes that load models, sample latents, and post-process images; everything is scriptable through a web UI and an API.
**Host:** Dankclaw — **Hostname:** `comfyui.dankclaw.local` — **Port:** 8188 — **Docs:** https://github.com/Comfy-Org/ComfyUI **Host:** Dankclaw — **Hostname:** `comfyui.dankclaw.local` — **Port:** 8188 — **Backend:** ROCm GPU (gfx1151) — **Docs:** https://github.com/Comfy-Org/ComfyUI
## Facts (from research, primary source) ## Facts
| Item | Value | | Item | Value |
|------|-------| |------|-------|
| Image | `ghcr.io/comfyanonymous/comfyui:latest` (community CPU build) | | Image | `comfyui-rocm:gfx1151` — built from `dankclaw/Containerfile.comfyui` |
| Base image | `docker.io/rocm/vllm:rocm7.12.0_gfx1151_ubuntu24.04_py3.12_pytorch_2.9.1_vllm_0.16.0` |
| Port | 8188 (host) → 8188 (container) | | Port | 8188 (host) → 8188 (container) |
| Models volume | bind mount to the model collection | | Backend | ROCm GPU (gfx1151 / Radeon 8060S). No `--cpu` flag. |
| CPU flag | `--cpu` — confirmed in `cli_args.py`: "To use the CPU for everything (slow)" | | Data | `/home/dank/comfyui-data/{models,input,output,custom_nodes}` → `/opt/ComfyUI/...` |
| Known issue | ROCm wheels do not ship kernels for gfx1151 (Strix Halo) — CPU backend required | | Run | `podman compose -f dankclaw/compose.yaml up -d comfyui` |
| Boot-persistent | user systemd unit `comfyui.service` (runs the compose `up` at boot) |
## Why CPU on Dankclaw ## Why the GPU works here
Dankclaw is an AMD Strix Halo APU (gfx1151). Precompiled PyTorch ROCm wheels do not ship kernels for this iGPU, and the official `rocm/comfyui` image is built for datacenter archs only (`PYTORCH_ROCM_ARCH=gfx942;gfx950`). This matches the knowledge base entry: the running instance uses `--cpu`. Dankclaw is an AMD Strix Halo APU (gfx1151). Standard PyTorch ROCm wheels do not ship gfx1151 kernels. So `torch.cuda.is_available()` returns `False` and ComfyUI falls back to CPU. AMD publishes a gfx1151-tagged build, and the image above is based on it. On this APU it reports `torch.cuda.is_available() = True`, device `Radeon 8060S`, capability `(11, 5)`. See [[ComfyUI ROCm and Vulkan]] for the full verification.
> **Update (2026-08-14):** the blanket claim "ROCm unavailable on Strix Halo" is now qualified. AMD publishes gfx1151-tagged PyTorch builds that work on this hardware, and sd.cpp/Lemonade ship gfx1151 kernels today. See [[ComfyUI ROCm and Vulkan]] and [[Lemonade and sd.cpp]]. The CPU config below remains correct until a gfx1151-enabled torch image is built. ## How the image is built
## Command Line (from `cli_args.py`) `dankclaw/Containerfile.comfyui` starts from the AMD gfx1151 base image and bakes the ComfyUI code in. It installs ComfyUI's dependencies but skips the torch family (torch, torchvision, torchaudio). The base image already ships the matching ROCm builds. Installing an unpinned `torch` from `requirements.txt` clobbers the gfx1151 kernels with a default build, so the Containerfile filters those lines out.
| Flag | Meaning | ## GPU device access (rootless)
|------|---------|
| `--cpu` | use CPU for everything | The container reaches the GPU through the `/dev/kfd` and `/dev/dri` device passthrough. The permission is checked host-side. The run user is already a member of the `render` group on the host, so the device is readable.
| `--cpu-vae` | run the VAE on CPU only |
| `--lowvram` | text encoders on CPU (dynamic VRAM default handles this) | Only the `video` group is added to the container. The `render` group (gid 990) is not added. Rootless podman cannot map it into the container namespace (the subgid range is 100000+), so `--group-add render` fails to start the container.
| `--listen` | bind address (0.0.0.0 for LAN) |
| `--port` | listen port (8188) |
## Volumes ## Volumes
| Container path | Host path (convention) | | Container path | Host path |
|----------------|------------------------| |----------------|-----------|
| `/workspace` | `/opt/comfyui` (models, input, output, custom_nodes) | | `/opt/ComfyUI/models` | `/home/dank/comfyui-data/models` |
| `/opt/ComfyUI/input` | `/home/dank/comfyui-data/input` |
| `/opt/ComfyUI/output` | `/home/dank/comfyui-data/output` |
| `/opt/ComfyUI/custom_nodes` | `/home/dank/comfyui-data/custom_nodes` |
## Start Fresh The ComfyUI code is baked into the image (not mounted). Rebuild the image to update the code.
The model collection starts from scratch. The first boot creates the directory structure; models are added per the knowledge base procedure. ## Boot persistence
The user systemd unit `~/.config/systemd/user/comfyui.service` runs `podman compose -f /home/dank/serverAppConfigs/dankclaw/compose.yaml up -d comfyui` at boot. It sets `WantedBy=default.target`, and user linger is on. The old CPU venv unit is preserved at `comfyui.service.venv.bak` as a fallback.
## Healthcheck ## Healthcheck
The web UI responds on the root path `/`. ComfyUI also exposes `/system_stats`. The web UI responds on `/`. ComfyUI also exposes `/system_stats`. On this APU, `/system_stats` reports `device=cuda:0 Radeon 8060S Graphics` (type `cuda`, the ROCm device).
## Gotchas ## Gotchas
- Expect minutes per image on CPU; that is the documented behavior for this APU. - The GPU path needs the device passthrough. Do not remove `/dev/kfd` or `/dev/dri` from the compose service.
- ComfyUI-Manager installs custom nodes into `custom_nodes/` — persist that directory. - Do not add the `render` group to the container. Rootless podman cannot map it. Add only `video`.
- Do not pull the CUDA image; it fails to find an NVIDIA driver. - Do not let pip reinstall the torch family. The Containerfile filters it out on purpose.
- The base image is about 32 GB. A code update means a rebuild, because the code is baked in.
- The model collection starts empty. Add models to `/home/dank/comfyui-data/models` before generating.
## See Also ## See Also
- [[Dankclaw Stack]] - [[Dankclaw Stack]]
- [[ComfyUI ROCm and Vulkan]] — live-verified GPU path research - [[ComfyUI ROCm and Vulkan]] — the live-verified GPU path research
- [[Lemonade and sd.cpp]] — the working ggml-family alternative - [[Lemonade and sd.cpp]] — the ggml-family alternative
- Knowledge base: [[ComfyUI]] (tools), [[ComfyUI Troubleshooting]] - Knowledge base: [[ComfyUI]] (tools), [[ComfyUI Troubleshooting]]
+3 -3
View File
@@ -72,9 +72,9 @@ Key facts:
ComfyUI is a PyTorch app. If you give it a PyTorch wheel with gfx1151 kernels — the AMD `/opt/python` build used by the working vLLM image, or a custom build with `PYTORCH_ROCM_ARCH=gfx1151` — ComfyUI **will** use the GPU via ROCm. The blocker is not ComfyUI; it is shipping it in a container that contains a gfx1151-enabled torch. ComfyUI is a PyTorch app. If you give it a PyTorch wheel with gfx1151 kernels — the AMD `/opt/python` build used by the working vLLM image, or a custom build with `PYTORCH_ROCM_ARCH=gfx1151` — ComfyUI **will** use the GPU via ROCm. The blocker is not ComfyUI; it is shipping it in a container that contains a gfx1151-enabled torch.
Three ways forward (future work, none applied yet): Three ways forward (way 1 applied 2026-08-19):
1. **Base a ComfyUI image on the AMD gfx1151 torch build.** Take `rocm/vllm:...gfx1151...pytorch_2.9.1...` (or AMD's PyTorch wheel index) and install ComfyUI on top. This is the direct path to GPU ComfyUI. 1. **Base a ComfyUI image on the AMD gfx1151 torch build.** Take `rocm/vllm:...gfx1151...pytorch_2.9.1...` (or AMD's PyTorch wheel index) and install ComfyUI on top. This is the direct path to GPU ComfyUI. **Applied:** the running `comfyui-rocm:gfx1151` image does exactly this (see `dankclaw/Containerfile.comfyui`).
2. **Build PyTorch for gfx1151** (`export PYTORCH_ROCM_ARCH=gfx1151` before build). Slow build, but a self-contained wheel afterwards. 2. **Build PyTorch for gfx1151** (`export PYTORCH_ROCM_ARCH=gfx1151` before build). Slow build, but a self-contained wheel afterwards.
3. **Use a ggml-family runtime instead** — stable-diffusion.cpp / Lemonade's `sd.cpp` backend ship their own gfx1151 HIP kernels and work today (see [[Lemonade and sd.cpp]]). 3. **Use a ggml-family runtime instead** — stable-diffusion.cpp / Lemonade's `sd.cpp` backend ship their own gfx1151 HIP kernels and work today (see [[Lemonade and sd.cpp]]).
@@ -87,7 +87,7 @@ Three ways forward (future work, none applied yet):
## Consequence for this repo ## Consequence for this repo
The current `dankclaw/compose.yaml` runs ComfyUI with `--cpu`. That remains correct **until a gfx1151-enabled torch image is built**. When GPU priority arrives, swap the image for one based on the AMD Strix-savvy build and drop `--cpu`. **Applied 2026-08-19.** `dankclaw/compose.yaml` now builds `comfyui-rocm:gfx1151` from `dankclaw/Containerfile.comfyui` (based on the AMD gfx1151 base), passes `/dev/kfd` + `/dev/dri`, adds the `video` group, and drops `--cpu`. The container runs on the Radeon 8060S (gfx1151) and is boot-persistent via a user systemd unit. See [[ComfyUI]] for the running config.
## Cleanup note ## Cleanup note