Media Worker

Media Worker

Generate images, video, and audio on The Grid. Earn AIPG for powering AI art and media creation.


What It Does

The Media Worker connects your GPU to The Grid for media generation:

  • Images - Flux, SDXL, Stable Diffusion
  • Video - AI video generation (coming soon: expanded support)
  • Audio - Sound and music generation (coming soon)

When users generate at aipg.art or via API, your worker creates the media and you earn AIPG.


Requirements

Hardware

ComponentMinimumRecommended
GPUNVIDIA 6 GB VRAMNVIDIA 12 GB+ VRAM
System RAM8 GB16 GB+
Storage50 GB free100 GB+ SSD

VRAM by Model

ModelVRAMQuality
SD 1.56 GBGood, fast, huge LoRA ecosystem
SDXL8 GBHigh quality, 1024px native
Flux Schnell12 GBFast, excellent quality
Flux Dev12 GBBest quality, slower
Video models16-32 GB5-14 second clips

Software

  • Docker Desktop
  • Node.js 18+
  • Grid API key

Setup

1. Get an API Key

  1. Go to dashboard.aipowergrid.io (opens in a new tab)
  2. Create an account
  3. Generate an API key

2. Clone the Repository

git clone https://github.com/AIPowerGrid/grid-media-worker
cd grid-media-worker

3. Configure

cp .env.example .env

Edit .env and add your API key:

GRID_API_KEY=your-api-key-here

4. Start

./start.sh

First run takes 45-60 minutes - downloads models, builds Docker containers.

Subsequent launches: under 2 minutes.

5. Select Models

Once running, open the web UI or desktop app:

  • Choose which models to host based on your VRAM
  • Click "Start Hosting"

Your worker is now live on The Grid.


Supported Models

Image Generation

ModelVRAMSpeedQualityNotes
SD 1.56 GBFastGoodHuge LoRA/checkpoint ecosystem
SDXL8 GBMediumGreat1024px native, good details
Flux Schnell12 GBFastExcellentBest speed/quality ratio
Flux Dev12 GBSlowBestHighest quality output

ControlNet & Extras

  • ControlNet - Canny, Depth, Pose, etc.
  • LoRA - Style and character adapters
  • Inpainting - Edit regions of images
  • Upscaling - 4x resolution enhancement

Video (Expanding)

ModelVRAMOutput
Video models16-32 GB5-14 second clips

Audio (Coming Soon)

Music and sound generation support planned.


Earning Rewards

How It Works

  1. Your worker connects to The Grid
  2. User requests an image at aipg.art or API
  3. The Grid routes the job to your worker
  4. Your GPU generates the image
  5. You earn AIPG for the completed job

Reward Factors

  • Image size - Larger images = more compute = more reward
  • Steps - More steps = more compute
  • Model complexity - Flux vs SD 1.5
  • Speed - Faster completions = more jobs/hour
  • Uptime - Consistent availability
  • Competition - Fewer workers = more jobs for you

What Earns Most

  1. Flux models - High demand, good rewards
  2. SDXL - Popular, solid earnings
  3. Video - Higher compute = higher rewards
  4. Batch jobs - Multiple images per request

Bonded Workers

Optionally bond AIPG for priority:

  • Higher priority job routing
  • Required for some premium jobs (future)
  • Bonding is NOT required to start earning

Configuration

Environment Variables

# .env file
GRID_API_KEY=your-api-key
MODELS=flux-schnell,sdxl    # Comma-separated
MAX_CONCURRENT_JOBS=1        # Based on VRAM

Docker Resources

Make sure Docker has enough resources:

  • Memory: 8 GB minimum, 16 GB recommended
  • CPU: 4+ cores
  • Disk: 50 GB+ for models

Multiple GPUs

Run separate worker instances per GPU:

# GPU 0
CUDA_VISIBLE_DEVICES=0 ./start.sh
 
# GPU 1 (different terminal)
CUDA_VISIBLE_DEVICES=1 ./start.sh

Best Practices

Maximize Earnings

  • Host Flux - Highest demand right now
  • Stay online 24/7 - More uptime = more jobs
  • Fast GPU - RTX 4090 crushes jobs quickly
  • Good internet - Fast uploads for results
  • Multiple models - More variety = more job types

Stability

  • Monitor VRAM - Don't overcommit
  • Check Docker logs - docker logs <container>
  • Update regularly - Pull latest worker version
  • Restart weekly - Keeps things fresh

Hardware Tips

GPUVRAMWhat to Run
RTX 306012 GBFlux Schnell, SDXL
RTX 308010 GBSDXL, SD 1.5
RTX 309024 GBEverything including video
RTX 408016 GBFlux, SDXL, some video
RTX 409024 GBEverything, fast

Cloud options: Runpod, Vast.ai work great for this.


Troubleshooting

Docker won't start:

  • Make sure Docker Desktop is running
  • Check Docker has enough memory allocated
  • Try docker system prune to free space

Out of VRAM:

  • Host fewer models simultaneously
  • Choose smaller models (SD 1.5 vs Flux)
  • Close other GPU applications
  • Restart the worker

Build fails:

  • Check Node.js version (18+)
  • Delete node_modules and reinstall
  • Check Docker disk space

No jobs coming in:

  • Normal during low-traffic periods
  • Verify worker shows online in dashboard
  • Make sure you're hosting popular models (Flux, SDXL)

Slow generation:

  • Check GPU utilization (should be high during jobs)
  • Ensure no other processes using GPU
  • Consider faster GPU

Network errors:

  • Check internet connection
  • Verify API key is correct
  • Check firewall isn't blocking

Model Registration

All models on The Grid are registered in the ModelVault contract on Base mainnet. This ensures:

  • Only verified models can be hosted
  • Model metadata (VRAM, capabilities) is on-chain
  • Workers can't serve unauthorized models

You don't need to worry about this—the worker handles it automatically.


Links

ResourceURL
Repositorygithub.com/AIPowerGrid/grid-media-worker (opens in a new tab)
Get API Keydashboard.aipowergrid.io (opens in a new tab)
Generate Imagesaipg.art (opens in a new tab)
Discorddiscord.gg/W9D8j6HCtC (opens in a new tab)