A self-hosted AI creative studio for image, video, and animation generation — powered by local GPU infrastructure, open models, Docker, Firebase, and Kubernetes.
Maya AI Studio is a production-oriented, open-source AI generation platform designed to make local AI creation as simple as a modern creative app.
Generate images, videos, and animations from prompts or reference images, manage checkpoints and LoRAs, monitor GPU workers in real time, track generation history, and expose a secure OAuth2 API for external tools — without requiring a paid per-generation AI API.
- Text → Image
- Image → Image
- Reference Image → Image
- Text → Video
- Image → Video
- Image → Animation
- Prompt + negative prompt
- Additional generation instructions
- Reference image uploads
- Seed and advanced generation parameters
- Batch generation
- Generation progress tracking
Designed for self-hosted inference with:
- Stable Diffusion
- SDXL
- ComfyUI
- Compatible local image models
- Local video models
- Animation pipelines
- Checkpoints
- LoRAs
- VAE
- ControlNet
- Upscalers
Models are configured through environment variables and/or the model manager rather than being hard-coded into the application.
Monitor connected rendering nodes in real time:
- GPU utilization
- VRAM usage
- GPU temperature
- CPU utilization
- RAM usage
- Queue depth
- Active jobs
- Render time
- Worker health
- Worker availability
- Model capabilities
Supports multiple local GPU workers for concurrent generation.
Every generation can retain:
- Prompt
- Negative prompt
- Model
- LoRAs
- Seed
- Steps
- CFG
- Sampler
- Resolution
- Worker
- GPU
- Render duration
- Timestamp
- Output
- Reference assets
- Job status
Actions include:
- Download
- Regenerate
- Edit
- Animate
- Reuse prompt
- Use as reference
- Copy metadata
- Favorite
- Delete
┌──────────────────────┐
│ Android / iOS │
│ Web Application │
└──────────┬───────────┘
│
HTTPS
│
▼
┌──────────────────────┐
│ API Gateway │
│ OAuth2 / OIDC / RBAC │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ API Service │
└──────────┬───────────┘
│
┌──────────┴──────────┐
│ │
▼ ▼
┌─────────────┐ ┌─────────────┐
│ PostgreSQL │ │ Redis │
│ Persistence │ │ Job Queue │
└─────────────┘ └──────┬──────┘
│
▼
┌────────────────┐
│ Scheduler │
└───────┬────────┘
│
┌──────────────────┼──────────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ GPU Node │ │ GPU Node │ │ GPU Node │
│ Image │ │ Video │ │ Animate │
└────┬─────┘ └────┬─────┘ └────┬─────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────┐
│ ComfyUI / Local AI Models │
└──────────────────────┬──────────────────────┘
│
▼
┌──────────────────┐
│ Object Storage │
│ Generated Assets │
└──────────────────┘
┌──────────────────────────┐
│ Prometheus + Grafana │
│ GPU / Worker Monitoring │
└──────────────────────────┘
Maya AI Studio uses a simple, visual navigation model.
Home
│
├── Quick Create
│ ├── Image
│ ├── Video
│ └── Animate
│
├── Recent Generations
├── Recommended Styles
└── Explore
Create
│
├── Image
├── Video
└── Animate
Gallery
│
├── Images
├── Videos
├── Animations
├── Projects
└── Favorites
Discover
│
├── Styles
├── Prompts
├── Templates
├── Models
└── Workflows
Me
│
├── Profile
├── Analytics
├── API
├── Workers
├── Storage
└── Settings
The UX is inspired by the simplicity of modern visual discovery applications, while maintaining an independent Maya AI design system and implementation.
Security is a core architectural requirement.
Maya AI Studio supports:
- OAuth2 / OIDC authentication
- JWT validation
- Role-based access control
- Scoped API permissions
- Secure API gateway
- Rate limiting
- Request validation
- Upload validation
- Audit logging
- Secure secrets management
- HTTPS
- Private GPU workers
- No direct public access to ComfyUI
External API scopes can include:
generation:create
generation:read
generation:delete
models:read
models:manage
workers:read
workers:manage
analytics:read
GPU workers should never be exposed directly to the public Internet.
The intended path is:
External Client
↓
HTTPS
↓
API Gateway
↓
OAuth2
↓
API
↓
Scheduler
↓
Private GPU Worker
Maya AI Studio is designed around self-hosted inference.
The application does not require a paid per-generation API such as:
OpenAI API
Midjourney API
Runway API
Hosted Stable Diffusion API
Instead:
Your GPU
↓
Docker
↓
ComfyUI
↓
Open Model
↓
Maya AI Studio
This means generation can be performed without a commercial AI inference API, subject to the availability and cost of the user's own hardware/infrastructure.
Free software does not mean free GPU compute. Running local models still requires appropriate hardware, electricity, storage, and potentially cloud infrastructure if GPUs are rented.
Maya AI Studio avoids hard-coding inference providers.
Example:
APP_ENV=development
FIREBASE_PROJECT_ID=
FIREBASE_STORAGE_BUCKET=
API_URL=
API_PORT=8000
OAUTH_ISSUER=
OAUTH_AUDIENCE=
IMAGE_ENGINE=comfyui
VIDEO_ENGINE=comfyui
ANIMATION_ENGINE=comfyui
COMFYUI_URL=http://comfyui:8188
DEFAULT_IMAGE_MODEL=sdxl
DEFAULT_VIDEO_MODEL=local-video
DEFAULT_ANIMATION_MODEL=local-animation
MODEL_PATH=/models
LORA_PATH=/models/loras
OUTPUT_PATH=/outputs
REDIS_URL=
DATABASE_URL=
MAX_CONCURRENT_JOBS=2
MAX_UPLOAD_MB=100Never commit production secrets to GitHub.
Maya AI Studio is designed to run locally using Docker Compose.
docker compose up -ddocker compose \
-f docker-compose.yml \
-f docker-compose.gpu.yml \
up -ddocker compose psdocker compose logs -fdocker compose downFor NVIDIA GPU workers, install the appropriate NVIDIA driver and NVIDIA Container Toolkit.
Verify:
nvidia-smiVerify Docker GPU access:
docker run --rm --gpus all \
nvidia/cuda:12.6.3-base-ubuntu24.04 \
nvidia-smiThe exact CUDA image should be adjusted according to the supported CUDA/driver combination of the target machine.
maya-ai-studio/
│
├── apps/
│ ├── mobile/
│ └── web/
│
├── services/
│ ├── api/
│ ├── auth/
│ ├── scheduler/
│ ├── generation/
│ ├── worker-manager/
│ └── metrics/
│
├── workers/
│ ├── image/
│ ├── video/
│ └── animate/
│
├── infrastructure/
│ ├── docker/
│ ├── nginx/
│ ├── prometheus/
│ ├── grafana/
│ └── kubernetes/
│
├── firebase/
│
├── tests/
│ ├── unit/
│ ├── integration/
│ └── e2e/
│
├── docs/
│
├── scripts/
│
├── docker-compose.yml
├── docker-compose.gpu.yml
├── .env.example
├── README.md
├── CONTRIBUTING.md
└── LICENSE
Firebase provides the application control plane.
Supports configurable authentication providers such as:
- Email/password
- OAuth providers
Suggested collections:
users
projects
generations
models
loras
workers
jobs
apiClients
auditLogs
settings
Used for:
- Reference images
- Thumbnails
- User assets
- Project files
- Generated media where appropriate
Large media storage can later be migrated to S3-compatible object storage without changing the core generation architecture.
Example:
POST /api/v1/generations
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/jsonRequest:
{
"type": "image",
"prompt": "cinematic Bangladeshi village at sunset",
"negative_prompt": "low quality, distorted",
"model": "sdxl",
"loras": [],
"width": 1024,
"height": 1024
}Response:
{
"job_id": "job_01HXYZ",
"status": "queued"
}Check the job:
GET /api/v1/generations/job_01HXYZText → Image
Image → Image
Reference → Image
Text → Video
Image → Video
Image → Animation
Reference → Animation
Maya AI Studio integrates with:
- Prometheus
- Grafana
- NVIDIA GPU metrics
- Worker health monitoring
Example metrics:
GPU utilization
VRAM utilization
GPU temperature
GPU power
CPU utilization
RAM utilization
Queue depth
Active jobs
Completed jobs
Failed jobs
Average render duration
Worker uptime
Docker Compose is intended for development and smaller deployments.
Kubernetes provides distributed production orchestration.
Kubernetes Cluster
│
├── API
├── Scheduler
├── API Gateway
├── Redis
├── PostgreSQL
│
├── GPU Node 01
│ └── Image Worker
│
├── GPU Node 02
│ └── Video Worker
│
└── GPU Node 03
└── Animation Worker
GPU workloads can request NVIDIA GPU resources:
resources:
limits:
nvidia.com/gpu: 1This enables Kubernetes to schedule GPU workloads across available nodes.
The project is designed for automated testing at multiple levels.
npm testnpm run test:integrationnpm run test:e2eTesting areas include:
- Authentication
- Authorization
- API validation
- Generation requests
- Queue scheduling
- Worker health
- Model discovery
- Upload validation
- History persistence
- API security
- Failure recovery
GitHub Actions is used for automated:
Push
↓
Lint
↓
Unit Tests
↓
Integration Tests
↓
E2E Tests
↓
Security Scan
↓
Docker Build
↓
Container Scan
↓
Registry Push
↓
Deployment
↓
Health Check
Workflow directory:
.github/workflows/
├── test.yml
├── build.yml
├── security.yml
└── deploy.yml
Recommended development environment:
- Git
- Docker
- Docker Compose
- Node.js
- Python
- NVIDIA GPU + drivers for local generation
- NVIDIA Container Toolkit
- Firebase project
- Optional Kubernetes cluster for distributed deployment
git clone https://github.com/YOUR_USERNAME/maya-ai-studio.git
cd maya-ai-studiocp .env.example .envEdit:
.env
with your Firebase, authentication, database, Redis, ComfyUI and model configuration.
docker compose up -dGPU deployment:
docker compose \
-f docker-compose.yml \
-f docker-compose.gpu.yml \
up -dThe mobile application is based on React Native / Expo.
Development:
cd apps/mobile
npm install
npx expo startProduction Android build:
eas build --platform androidProduction builds should generate:
APK
AAB
The Android application communicates with the backend; AI inference remains on the configured server/GPU workers.
cd apps/web
npm install
npm run devProduction:
npm run buildExternal applications can submit authenticated generation jobs.
Example:
curl -X POST \
"$API_URL/api/v1/generations" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "image",
"prompt": "cinematic futuristic Dhaka skyline at night",
"model": "sdxl"
}'Maya AI Studio follows these principles:
- Never commit secrets.
- Never expose GPU workers directly.
- Require authentication for external APIs.
- Validate all uploaded files.
- Apply request-size limits.
- Apply API rate limits.
- Use least-privilege API scopes.
- Encrypt communication using HTTPS.
- Keep model execution isolated in containers.
- Maintain audit logs for sensitive operations.
- Repository architecture
- React web application
- Expo mobile application
- Firebase authentication
- Firebase persistence
- Docker Compose
- API foundation
- ComfyUI integration
- Image generation
- Reference image generation
- Video generation
- Animation
- Model manager
- LoRA manager
- Redis scheduler
- Multi-GPU workers
- Worker health monitoring
- Persistent generation history
- Prometheus
- Grafana
- OAuth2/OIDC
- RBAC
- API scopes
- Rate limiting
- Audit logging
- Kubernetes
- GPU-aware scheduling
- CI/CD
- Automated E2E tests
- Production APK
- Production AAB
- Production deployment
Contributions are welcome.
git checkout -b feature/my-featureMake your changes, test them, then:
git add .
git commit -m "feat: add my feature"
git push origin feature/my-featureOpen a Pull Request.
Please ensure:
- tests pass
- no secrets are committed
- Docker builds successfully
- API contracts remain backwards compatible
- security-sensitive changes include tests
This project is released under the Apache License 2.0.
See LICENSE for details.
Maya AI Studio is an inference platform and does not automatically grant rights to third-party AI models or generated content.
Users are responsible for checking the license and usage restrictions of every model, checkpoint, LoRA, ControlNet, dataset, image, video, and other asset they install or use.
Only use models and assets whose licenses permit your intended use.
Maya AI Studio is provided as a self-hosted software platform.
The project does not guarantee:
- unlimited generation
- unlimited GPU capacity
- compatibility with every model
- compatibility with every GPU
- commercial rights to generated content
- availability of third-party model repositories
Actual performance depends on the user's hardware, models, configuration, storage, network and infrastructure.
Make powerful AI creation accessible without forcing creators into a paid per-generation ecosystem.
Maya AI Studio brings together:
Local AI
+
Open Models
+
GPU Computing
+
Creative Tools
+
Secure APIs
+
Cloud Control Plane
+
Distributed Infrastructure
into one extensible creative platform.
Build locally. Generate freely. Scale when needed.