Image Worker
Generate images on The Grid using ComfyUI. Earn AIPG for powering AI art.
Worker bond: 1,000 AIPG minimum. Image workers use the same bonding model
as text workers — stake AIPG via WorkerRegistry, get slashed if you serve
bad results. See Run a Node for the bigger picture.
What You’re Running
The Comfy Bridge connects your ComfyUI installation to The Grid:
- You run ComfyUI locally with your models
- The bridge polls The Grid for jobs
- Your GPU renders images
- You upload results and earn AIPG
Your existing ComfyUI setup works as-is. The bridge just connects it to the network.
Requirements
| Component | Minimum | Recommended |
|---|---|---|
| GPU | NVIDIA 6 GB VRAM | NVIDIA 12 GB+ |
| RAM | 8 GB | 16 GB+ |
| Storage | 50 GB | 100 GB+ SSD |
| Software | Python 3.9+, ComfyUI running | Same |
VRAM by Model
| Model | VRAM | Notes |
|---|---|---|
| SD 1.5 | 6 GB | Fast, huge LoRA ecosystem |
| SDXL | 8 GB | 1024px native, great quality |
| Flux Schnell | 12 GB | Fast, excellent quality |
| Flux Dev | 12 GB | Best quality, slower |
Quick Start
1. Get ComfyUI Running
If you don’t have ComfyUI yet:
git clone https://github.com/comfyanonymous/ComfyUI
cd ComfyUI
pip install -r requirements.txt
python main.pyComfyUI should be running at http://127.0.0.1:8000.
2. Get an API Key
Register at dashboard.aipowergrid.io
3. Install the Bridge
git clone https://github.com/AIPowerGrid/comfy-bridge
cd comfy-bridge
pip install -e .4. Configure
cp .env.example .envEdit .env:
GRID_API_KEY=your-api-key-here
COMFYUI_URL=http://127.0.0.1:80005. Run
python -m bridge.cliThe bridge connects to The Grid and starts accepting jobs.
Configuration
All settings go in .env:
| Variable | Default | Description |
|---|---|---|
GRID_API_KEY | (required) | Your API key |
COMFYUI_URL | http://127.0.0.1:8000 | Your ComfyUI address |
GRID_WORKER_NAME | ComfyWorker | Name shown on the network |
GRID_MODEL | (auto-detect) | Models to advertise (comma-separated) |
GRID_THREADS | 2 | Concurrent jobs |
GRID_MAX_PIXELS | 1048576 | Max output resolution |
GRID_NSFW | false | Accept NSFW jobs |
WORKFLOW_FILE | Custom workflow JSON |
Model Auto-Detection
By default, the bridge scans your ComfyUI checkpoints and advertises matching models. Override with:
GRID_MODEL=stable_diffusion, flux-schnellDocker
Linux (Host Networking)
docker build -t comfy-bridge .
docker run --rm --network host --env-file .env comfy-bridgemacOS / Windows
docker run --rm \
--env-file .env \
-e COMFYUI_URL=http://host.docker.internal:8000 \
comfy-bridgeDocker Compose
# Linux
docker-compose -f docker-compose.linux.yml up --build
# macOS/Windows
docker-compose -f docker-compose.win-macos.yml up --buildCustom Workflows
Export a workflow from ComfyUI as JSON, place it in workflows/, and set:
WORKFLOW_FILE=my_workflow.jsonThe bridge uses your workflow as a template for incoming jobs.
Earning
How It Works
- User requests an image at aipg.art or via API
- The Grid routes the job to your worker
- Your GPU generates the image via ComfyUI
- You upload the result
- You earn AIPG
What Earns Most
- Flux models — high demand, good rewards
- Large images — more compute = more reward
- High step counts — more work = more pay
- 24/7 uptime — consistent availability wins
Troubleshooting
No jobs coming in?
- Check
Advertising models:in logs - Make sure
GRID_MODELmatches what users request - Verify ComfyUI is running
ComfyUI unreachable?
- Confirm
COMFYUI_URLis correct - Check ComfyUI is running on that port
400 Bad Request?
- Model name mismatch — check
GRID_MODELvalues
Auth errors?
- Verify
GRID_API_KEYis correct
Links
| Resource | URL |
|---|---|
| Repository | github.com/AIPowerGrid/comfy-bridge |
| Get API Key | dashboard.aipowergrid.io |
| ComfyUI | github.com/comfyanonymous/ComfyUI |
| Discord | discord.gg/W9D8j6HCtC |