# ComfyUI 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 — **Backend:** ROCm GPU (gfx1151) — **Docs:** https://github.com/Comfy-Org/ComfyUI ## Facts | Item | Value | |------|-------| | 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) | | Backend | ROCm GPU (gfx1151 / Radeon 8060S). No `--cpu` flag. | | Data | `/home/dank/comfyui-data/{models,input,output,custom_nodes}` → `/opt/ComfyUI/...` | | Run | `podman compose -f dankclaw/compose.yaml up -d comfyui` | | Boot-persistent | user systemd unit `comfyui.service` (runs the compose `up` at boot) | ## Why the GPU works here 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. ## How the image is built `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. ## GPU device access (rootless) 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. 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. ## Volumes | Container path | Host path | |----------------|-----------| | `/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` | The ComfyUI code is baked into the image (not mounted). Rebuild the image to update the code. ## Custom nodes Custom nodes go in `/home/dank/comfyui-data/custom_nodes` (mounted at `/opt/ComfyUI/custom_nodes`). ComfyUI loads every subdirectory there on start. Because this path is a bind mount, it shadows anything baked into the image — so custom nodes are installed host-side, not in the Containerfile. **ComfyUI-Manager** is installed here. Install it with a one-time clone, then restart the container: ```bash git clone https://github.com/ltdrdata/ComfyUI-Manager \ /home/dank/comfyui-data/custom_nodes/ComfyUI-Manager systemctl --user restart comfyui ``` ComfyUI-Manager self-installs its own pip dependencies on start (GitPython, PyGithub, matrix-nio, transformers, and more). To confirm it loaded, query `GET /manager/version` (returns a version like `V3.41`). Its pip installs live in the container's writable layer, so they survive a restart and a reboot but not an image rebuild; after a rebuild, Manager re-installs them on the next start. ## 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 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 - The GPU path needs the device passthrough. Do not remove `/dev/kfd` or `/dev/dri` from the compose service. - Do not add the `render` group to the container. Rootless podman cannot map it. Add only `video`. - 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 - [[Dankclaw Stack]] - [[ComfyUI ROCm and Vulkan]] — the live-verified GPU path research - [[Lemonade and sd.cpp]] — the ggml-family alternative - Knowledge base: [[ComfyUI]] (tools)