Replace your photo background with AI
Tap to upload a photo
Selfies and portraits work best
This demo uses a multi-step AI pipeline to swap backgrounds while preserving the subject:
Image Upload
POST /api/image/upload
{ "image_base64": "..." }
LLaVA 1.5 7B
POST /api/gpu
{ "model": "@cf/llava-hf/llava-1.5-7b-hf", ... }
Describes the subject in detail - appearance, clothing, pose, expression.
SDXL Lightning Cloudflare Workers AI
POST /api/gpu/image/transform
{ "image_base64": "...", "prompt": "[subject] in [background]" }
Transforms the image while keeping the subject and adding the new background.