This repository has been archived on 2026-10-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
imagelab-runpod/README.md
T
donnyandClaude Opus 4.7 c8b93a1300 Initial: ImageLab v3 RunPod image
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 21:42:52 -07:00

3.5 KiB

imagelab-runpod

ComfyUI Docker image for RunPod, built around the imagelab_v3_extension custom node. Model downloading is owned by the extension (CIVITAI_TOKEN + IMAGELAB_AUTO_DOWNLOAD); this image only sets up the runtime and the small set of custom nodes the ImageLab web app's workflow graph needs.

What's inside

  • nvidia/cuda:12.8.1-cudnn-devel-ubuntu24.04 base
  • PyTorch nightly w/ CUDA 12.8 — required for Blackwell (B200 / 5090) GPUs; works on Hopper / Ampere / consumer cards too
  • Triton + SageAttention (installed in background at boot; auto-enabled when present)
  • ComfyUI launched with --preview-method taesd --preview-size 768 --enable-cors-header so the web app sees live previews

Custom nodes installed

Node Why
imagelab_v3_extension /imagelab/* API — model hashing, CivitAI lookups + downloads, model delete
ComfyUI-Inpaint-CropAndStitch InpaintCropImproved / InpaintStitchImproved (canvas inpaint pipeline)
ComfyUI-BRIA_AI-RMBG BRIA_RMBG_ModelLoader_Zho / BRIA_RMBG_Zho (Remove BG post step)
ComfyUI-WD14-Tagger WD14Tagger|pysssss (legacy auto-tag path; harmless if unused)
ComfyUI-Manager In-UI node manager — useful on a fresh pod
ComfyUI-Custom-Scripts rgthree-adjacent QoL — pythongosssss helpers
rgthree-comfy QoL routing / reroute / fast groups
ComfyUI_essentials Common utility nodes a lot of community workflows assume

The BRIA RMBG-1.4 model is downloaded at first boot into the node's RMBG-1.4 folder (HF; works without auth, but pass HF_TOKEN if you've been rate-limited).

Environment variables

Var Default Effect
CIVITAI_TOKEN unset Read by the extension. Required for any gated CivitAI download.
IMAGELAB_AUTO_DOWNLOAD unset Comma/newline list the extension queues at server start (CivitAI version ids, model ids, full URLs, or <folder>::<entry> overrides).
HF_TOKEN unset Used by the BRIA RMBG download if HuggingFace rate-limits anon.
SAGE_ATTENTION true false to skip install + --use-sage-attention entirely.
COMFYUI_ARGS (auto) Override the auto-derived ComfyUI args completely.

Building locally

docker build -t imagelab-runpod .
docker run --gpus all -p 8188:8188 \
    -e CIVITAI_TOKEN=... \
    -e IMAGELAB_AUTO_DOWNLOAD=... \
    -v /path/to/models:/workspace/ComfyUI/models \
    imagelab-runpod

CI / publishing

.gitea/workflows/build.yml builds + pushes the image to gitea.dev.blueoceanswim.com/donny/imagelab-runpod on every push to main and on every v* tag:

  • :latest — every main build
  • :<short-sha> — every build
  • :<tag> — when a v* tag is pushed

Needs a GITEA_TOKEN secret with write access to the package registry on this repo.

Pointing RunPod at the image

In RunPod, pick Custom Template, set the image to gitea.dev.blueoceanswim.com/donny/imagelab-runpod:latest, expose port 8188, mount your volume at /workspace/ComfyUI/models, and set the env vars above.

GPU notes

The startup script reads nvidia-smi and picks ComfyUI flags by VRAM bucket:

VRAM Precision Notes
≥ 180 GB --bf16-vae --bf16-unet B200 / GB200
≥ 80 GB --bf16-vae --bf16-unet H100 / H200
≥ 40 GB --fp16-vae --fp16-unet A100
≥ 20 GB --fp16-vae --fp16-unet RTX 3090 / 4090 / 5090
< 20 GB --lowvram anything smaller

When SageAttention is installed (default), --use-sage-attention is added automatically.