Files
pi_mcps/docs/wiki/pages/mcp-image-gen-ComfyUI-Setup.md
T
Patrick Plate dabdda167f docs(wiki): migrate to git-based workflow with persistent wiki/ clone
- Extract all wiki content from create_wiki_pages.py into docs/wiki/pages/*.md
- Add docs/wiki/deploy_wiki.sh: copies pages to wiki/ repo, commits, pushes
- Add /wiki/ to .gitignore (anchored — does not affect docs/wiki/)
- 12 pages: Home, MCP-Servers-Overview, mcp-image-gen, ComfyUI-Setup,
  mcp-webscraper (8 tools incl. search_hint), BigMind (schema v8),
  Development-Conventions, Java-Projects, Java-wellmann-shop,
  Java-mss-failsafe, Java-Architecture, _Sidebar
- Workflow: edit docs/wiki/pages/*.md → ./docs/wiki/deploy_wiki.sh
2026-04-05 09:48:19 +02:00

3.1 KiB
Raw Blame History

⚙️ ComfyUI Setup Guide (AMD ROCm)

This guide covers installing ComfyUI with FLUX.1-schnell on a Fedora Linux system with an AMD GPU.

Prerequisites

  • AMD GPU with ROCm support (tested: RX 7900 XTX)
  • Fedora Linux (tested: Fedora 43 / kernel 6.19)
  • Python 3.11+
  • ~15GB free disk space (model weights)
  • HuggingFace account with FLUX license accepted

Step 1: Install ComfyUI

ComfyUI is not on PyPI — must be cloned from source:

cd ~
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
python -m venv .venv
source .venv/bin/activate

# Install PyTorch ROCm build (CRITICAL for AMD GPUs)
pip install torch torchvision --index-url https://download.pytorch.org/whl/rocm6.2

# Install ComfyUI dependencies
pip install -r requirements.txt

Step 2: Download FLUX.1-schnell

FLUX.1-schnell is gated on HuggingFace — you must:

  1. Create a HuggingFace account
  2. Accept the FLUX.1-schnell license at https://huggingface.co/black-forest-labs/FLUX.1-schnell
  3. Generate an access token at https://huggingface.co/settings/tokens
# Install huggingface_hub
pip install huggingface_hub

# Download model (requires HF token)
huggingface-cli download black-forest-labs/FLUX.1-schnell \
  flux1-schnell.safetensors \
  --local-dir ~/ComfyUI/models/checkpoints \
  --token YOUR_HF_TOKEN_HERE

Step 3: Download VAE and CLIP Models

FLUX.1-schnell also requires VAE and CLIP text encoders:

# VAE
huggingface-cli download black-forest-labs/FLUX.1-schnell \
  ae.safetensors \
  --local-dir ~/ComfyUI/models/vae

# CLIP models (T5 and CLIP-L)
huggingface-cli download comfyanonymous/flux_text_encoders \
  t5xxl_fp8_e4m3fn.safetensors clip_l.safetensors \
  --local-dir ~/ComfyUI/models/clip

Step 4: Start ComfyUI

cd ~/ComfyUI

# AMD GPU REQUIRES this environment variable
HSA_OVERRIDE_GFX_VERSION=11.0.0 \
  nohup .venv/bin/python main.py --listen --port 8188 > /tmp/comfyui.log 2>&1 &

echo "ComfyUI PID: $!"

⚠️ HSA_OVERRIDE_GFX_VERSION=11.0.0 is mandatory for RX 7900 XTX on ROCm. Without it, model loading fails silently.

Step 5: Verify ComfyUI is Running

curl http://localhost:8188/system_stats
# Should return JSON with GPU info

Step 6: Configure mcp-image-gen

cd /home/pplate/pi_mcps/mcp/mcp-image-gen

# Environment variables (set in .roo/mcp.json or shell):
# COMFYUI_URL=http://localhost:8188
# IMAGE_OUTPUT_DIR=~/Pictures/mcp-generated
# COMFYUI_TIMEOUT=120

Performance

GPU Model Resolution Steps Time
AMD RX 7900 XTX FLUX.1-schnell 1024×1024 4 ~8s
AMD RX 7900 XTX FLUX.1-schnell 1280×512 4 ~7s

Troubleshooting

Problem Solution
HTTP 401 downloading model Accept FLUX license on HuggingFace first
GPU not detected Ensure HSA_OVERRIDE_GFX_VERSION=11.0.0 is set
Connection refused from mcp-image-gen Start ComfyUI first, check port 8188
Slow generation (>60s) ComfyUI may be running on CPU — check ROCm install
Ollama image gen As of April 2026: macOS-only, not available on Linux