From 4660af57ade6b6fd8502719394e4c2fd47f5cab3 Mon Sep 17 00:00:00 2001 From: pplate Date: Sat, 4 Apr 2026 14:35:05 +0200 Subject: [PATCH] docs: create mcp-image-gen-ComfyUI-Setup wiki page --- mcp-image-gen-ComfyUI-Setup.-.md | 96 ++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 mcp-image-gen-ComfyUI-Setup.-.md diff --git a/mcp-image-gen-ComfyUI-Setup.-.md b/mcp-image-gen-ComfyUI-Setup.-.md new file mode 100644 index 0000000..45f2b41 --- /dev/null +++ b/mcp-image-gen-ComfyUI-Setup.-.md @@ -0,0 +1,96 @@ +# ⚙️ 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: + +```bash +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 + +```bash +pip install huggingface_hub + +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 + +```bash +# VAE +huggingface-cli download black-forest-labs/FLUX.1-schnell \ + ae.safetensors \ + --local-dir ~/ComfyUI/models/vae + +# CLIP models +huggingface-cli download comfyanonymous/flux_text_encoders \ + t5xxl_fp8_e4m3fn.safetensors clip_l.safetensors \ + --local-dir ~/ComfyUI/models/clip +``` + +## Step 4: Start ComfyUI + +```bash +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 + +```bash +curl http://localhost:8188/system_stats +``` + +## 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` | 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 |