Setting Up ComfyUI — Local Image Generation by node
ComfyUI lets you generate images on your own computer. Character portraits, cover art, scene illustrations — all running locally, no cloud costs. ## What is ComfyUI? ComfyUI is a node-based interface for Stable Diffusion. You build image generation workflows by connecting nodes, and the results are generated on your GPU. CivNode can connect to ComfyUI's API to request images directly. ## Hardware requirements Image generation is GPU-intensive: - **Minimum:** NVIDIA GPU with 6GB VRAM (GTX 1060 or equivalent). Expect slow generation — 30-60 seconds per image. - **Recommended:** NVIDIA GPU with 8-12GB VRAM (RTX 3060/3070). Fast enough for comfortable use — 5-15 seconds per image. - **Ideal:** NVIDIA GPU with 16-24GB VRAM (RTX 4080/4090). Nearly instant generation. Can run larger models. AMD GPUs work on Linux with ROCm support. Apple Silicon Macs work with MPS but are slower than equivalent NVIDIA cards. ## Installation **Option 1: Direct install (recommended)** 1. Install Python 3.10 or 3.11 2. Clone ComfyUI: `git clone https://github.com/comfyanonymous/ComfyUI.git` 3. Install dependencies: `pip install -r requirements.txt` 4. Install PyTorch with GPU support (follow pytorch.org for your platform) 5. Download a model — Stable Diffusion XL is a good starting point. Place the checkpoint file in `ComfyUI/models/checkpoints/` 6. Start ComfyUI: `python main.py` It runs on `http://localhost:8188` by default. **Option 2: Standalone packages** ComfyUI offers pre-packaged releases for Windows that include Python and dependencies. Check the ComfyUI GitHub releases page. ## Connecting to CivNode 1. Go to **Settings → AI Providers → Image Generation** 2. Set type to ComfyUI 3. Enter URL: `http://localhost:8188` 4. Save CivNode will use ComfyUI for: - Character portrait generation - Cover art generation - Scene image generation (from the exploration pane) ## What it generates **Character portraits:** Based on your character descriptions. CivNode sends the character's physical description to ComfyUI and gets back a portrait. **Cover art:** Based on your work's title, genre, and themes. You can iterate on suggestions. **Scene images:** When the exploration pane suggests an `<image>` tag, ComfyUI generates it locally. ## Tips - SDXL models produce the best quality for portraits and covers. Download one from CivitAI or Hugging Face. - Generation takes a few seconds per image. The AI status widget shows progress. - If images look wrong, the prompt might need adjusting — CivNode sends descriptive prompts, but different models interpret them differently. - Keep ComfyUI running while you work in CivNode. It doesn't use much resources when idle.