DGX-Pixels: AI Pixel Art Generation Stack
An open-source AI-powered pixel art generation system optimized for the NVIDIA DGX-Spark, designed to accelerate game asset creation with seamless integration into the Bevy game engine.
Overview
DGX-Pixels leverages state-of-the-art diffusion models (Stable Diffusion XL) with custom LoRA fine-tuning to generate high-quality pixel art sprites for game development. The system is designed to run on NVIDIA DGX-Spark (GB10 Grace Blackwell Superchip), utilizing its single powerful GPU with 128GB unified memory architecture for fast inference and efficient model training.
Hardware Note: This system targets the DGX-Spark GB10 (single GPU, unified memory) rather than multi-GPU datacenter systems. This architecture provides unique advantages for interactive pixel art generation, including zero-copy image transfers and simplified deployment. See Hardware Specification and ADR 0001 for details.
Key Features
- AI-Powered Generation: Stable Diffusion XL with pixel art-specialized LoRA models
- Hardware Optimized: Maximizes NVIDIA DGX-Sparkβs 1000 TOPS compute and FP4 precision support
- Bevy Integration: Direct integration via Model Context Protocol (MCP) for automated asset deployment
- Custom Training: LoRA fine-tuning pipeline for consistent, game-specific art styles
- Production Ready: Multiple architecture proposals from rapid prototyping to enterprise scale
- 100% Open Source: All components use open-source tools and models
Use Cases
- Character sprite generation (idle, walk, attack animations)
- Environment tiles and props
- Item and weapon sprites
- UI icons and effects
- Rapid prototyping and iteration
- Style-consistent asset expansion
Quick Start
Prerequisites
- NVIDIA DGX-Spark (GB10 Grace Blackwell Superchip) with Ubuntu/Linux
- Python 3.10+ (ARM64-compatible packages)
- CUDA 13.0+ (verified: 13.0.88)
- Driver 580.95.05+
- 500GB+ storage
- Bevy game engine (for integration)
Installation (Rapid Path)
# Clone repository
git clone https://github.com/YOUR_ORG/dgx-pixels.git
cd dgx-pixels
# Install Automatic1111 WebUI
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
./webui.sh --api --listen
# Download pixel art models (see docs/06-implementation-plan.md)See Implementation Plan for detailed setup instructions.
Architecture
DGX-Pixels offers multiple architecture proposals:
- Rapid Prototyping (1-2 weeks): Simple CLI + Automatic1111 for quick validation
- Balanced Production (4-6 weeks): ComfyUI + FastAPI + MCP integration
- π Rust TUI + Python (5-6 weeks): Fast TUI with side-by-side model comparison (NEW RECOMMENDED)
- Advanced Enterprise (8-12 weeks): Full microservices with Kubernetes, MLOps, and web UI
See Architecture Proposals for detailed comparisons.
NEW: Rust TUI + Python Backend (Recommended)
Hybrid architecture combining Rustβs performance with Pythonβs AI ecosystem:
ββββββββββββββββββββββββββββββββββββββββ
β NVIDIA DGX-Spark β
β βββββββββββββββββββββ β
β β Rust TUI β 60 FPS, 12MB β
β β - ratatui β Sixel preview β
β β - Live updates β Comparison UI β
β ββββββββββ¬βββββββββββ β
β β ZeroMQ <1ms β
β ββββββββββΌβββββββββββ β
β β Python Worker β Job queue β
β β - ZMQ server β Progress pub β
β ββββββββββ¬βββββββββββ β
β β HTTP/WS β
β ββββββββββΌβββββββββββ β
β β ComfyUI β SDXL + LoRAs β
β β - Multiple modelsβ Workflows β
β βββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββ
Key Features:
- Side-by-side model comparison: Test pre-trained vs custom LoRAs simultaneously
- 60+ FPS TUI: Fast, responsive terminal interface
- <1ms IPC: ZeroMQ for near-instant communication
- Leverages playbooks: Uses dgx-spark-playbooks ComfyUI setup
See Rust-Python Architecture and TUI Design.
Alternative: Balanced Production Stack
βββββββββββββββββββββββββββββββββββββββ
β NVIDIA DGX-Spark β
β ββββββββββββββββββββββββββββββββ β
β β ComfyUI Inference Engine β β
β β + Custom LoRA Models β β
β ββββββββββββββββ¬ββββββββββββββββ β
β β β
β ββββββββββββββββΌββββββββββββββββ β
β β FastAPI Orchestration β β
β β + MCP Server β β
β ββββββββββββββββ¬ββββββββββββββββ β
βββββββββββββββββββΌββββββββββββββββββββ
β
β MCP Protocol
β
βββββββββΌβββββββββ
β bevy_brp_mcp β
βββββββββ¬βββββββββ
β
βΌ
βββββββββββββββββ
β Bevy Project β
β assets/ β
βββββββββββββββββ
Documentation
Core Documentation
- Research Findings - Comprehensive research on AI pixel art generation, DGX-Spark capabilities, and integration technologies
- Architecture Proposals - Four detailed architecture proposals with pros/cons/timelines
- Technology Deep Dive - In-depth technical documentation on SDXL, LoRA, ComfyUI, and optimizations
- Bevy Integration - Complete guide for integrating with Bevy game engine
- Training Roadmap - Strategy for training custom models and maintaining quality
- Implementation Plan - Step-by-step implementation guide for all architecture paths
NEW: Rust + Python Stack
- Rust-Python Architecture - Hybrid Rust TUI + Python backend design with ZeroMQ IPC
- TUI Design - Complete TUI mockups, workflows, and side-by-side model comparison
- Playbook Contribution - Contributing to dgx-spark-playbooks repository
NEW: Project Management & Operations
- Hardware Specification - Verified DGX-Spark GB10 specifications and topology
- Metrics Framework - Performance, quality, and observability metrics
- Roadmap - Milestone-based development roadmap (M0-M5)
- RFD: GPT-5 Feedback - External review and recommendations
- ADR 0001 - Hardware clarification: DGX-Spark vs DGX B200
Quick Links
| Topic | Documentation |
|---|---|
| Getting Started | Implementation Plan Β§ Quick Start |
| Architecture Selection | Architecture Proposals Β§ Comparison |
| Bevy Setup | Bevy Integration Β§ Setup |
| Model Training | Training Roadmap Β§ Phase 2 |
| API Reference | Technology Deep Dive Β§ FastAPI |
| Troubleshooting | Implementation Plan Β§ Troubleshooting |
Technology Stack
Core Technologies
| Component | Technology | Purpose |
|---|---|---|
| Base Model | Stable Diffusion XL 1.0 | Image generation foundation |
| Fine-tuning | LoRA (Low-Rank Adaptation) | Custom style training |
| Inference | ComfyUI | Fast, flexible generation workflows |
| Training | Kohya_ss / Diffusers | LoRA training pipeline |
| API | FastAPI | REST API and orchestration |
| Integration | Model Context Protocol (MCP) | Bevy communication |
| Game Engine | Bevy 0.13+ | Target integration platform |
Hardware Optimization
- NVIDIA GB10 (Grace Blackwell): Single superchip with unified memory architecture
- 1000 TOPS Compute: Ultra-fast inference (2-4s per sprite)
- 128GB Unified Memory: Zero-copy CPUβGPU transfers, multiple concurrent models
- ARM Grace CPU: 20 cores (Cortex-X925 + A725) for energy-efficient preprocessing
- Compute Capability 12.1: Latest Tensor Core features
See Technology Deep Dive for comprehensive technical details.
Training Custom Models
Custom LoRA training dramatically improves generation quality:
Benefits:
- 80%+ reduction in post-processing time
- Consistent art style across all assets
- Character identity preservation
- Game-specific prompt understanding
Requirements:
- 50-100 reference images
- 2-4 hours training time (on DGX-Spark)
- ~$5-10 in compute costs
Timeline:
- Week 1-2: Test pre-trained models, collect references
- Week 3-4: Train general style LoRA
- Week 5-8: Train specialized models (characters, environments, items)
- Week 9-10: Character-specific models for consistency
- Week 11-12: Refinement based on production feedback
See Training Roadmap for detailed training strategy.
Bevy Integration
Manual Workflow
# Generate sprite
dgx-pixels generate character "medieval knight"
# Copy to Bevy assets
cp output/knight.png ~/my_game/assets/sprites/characters/
# Use in Bevy
commands.spawn(SpriteBundle {
texture: asset_server.load("sprites/characters/knight.png"),
..default()
});Automated MCP Workflow
// Bevy: Enable MCP
use bevy_brp_mcp::BrpMcpPlugin;
App::new()
.add_plugins(BrpMcpPlugin::default())
.run();# DGX-Pixels: MCP tool
@mcp.tool()
async def generate_and_deploy(prompt: str, bevy_project: str):
"""Generate and auto-deploy to Bevy project."""
# Generates sprite and places in bevy_project/assets/
passSee Bevy Integration Guide for complete details.
Performance Benchmarks
On NVIDIA DGX-Spark GB10 (verified hardware):
| Operation | Expected Time | Details |
|---|---|---|
| Inference (SDXL + LoRA) | 2-4s | 1024x1024 image @ FP16 |
| Batch Generation | 15-25/min | Multiple sprites (batch=8) |
| LoRA Training | 2-4 hours | 50 images, 3000 steps @ FP16 |
| Model Loading | <10s | SDXL base + LoRA in unified memory |
| Zero-Copy Transfers | <1ΞΌs | CPUβGPU (unified memory advantage) |
Unified Memory Benefits:
- No CPUβGPU memory copies for image data
- Lower latency for preprocessing and preview
- Larger batch sizes (128GB shared pool)
- Simplified memory management
Comparison to Manual Creation:
- Traditional pixel art: 30-120 minutes per sprite
- AI generation + touch-up: 5-15 minutes per sprite
- Time savings: 70-90%
See Metrics Framework for detailed performance targets.
Project Structure
dgx-pixels/
βββ README.md # This file
βββ docs/ # Comprehensive documentation
β βββ 01-research-findings.md
β βββ 02-architecture-proposals.md
β βββ 03-technology-deep-dive.md
β βββ 04-bevy-integration.md
β βββ 05-training-roadmap.md
β βββ 06-implementation-plan.md
βββ src/ # Source code (to be implemented)
β βββ api/ # FastAPI application
β βββ cli/ # CLI tools
β βββ training/ # Training scripts
β βββ processing/ # Post-processing pipeline
βββ workflows/ # ComfyUI workflow templates
βββ models/ # Model storage
β βββ checkpoints/ # Base models
β βββ loras/ # Trained LoRAs
β βββ configs/ # Model configurations
βββ examples/ # Example Bevy integrations
Roadmap
See ROADMAP.md for the complete milestone-based development plan.
Current Milestones
| Milestone | Status | Goal |
|---|---|---|
| M0 β Foundation | π’ In Progress | Hardware verification, reproducibility, baselines |
| M1 β Core Inference | βͺ Planned | Single-GPU SDXL optimization |
| M2 β Interactive TUI | βͺ Planned | Rust TUI with ZeroMQ + Sixel preview |
| M3 β LoRA Training | βͺ Planned | Custom model fine-tuning pipeline |
| M4 β Bevy Integration | βͺ Planned | MCP-based game engine integration |
| M5 β Production | βͺ Planned | Observability, metrics, deployment |
Recent Updates
- β Hardware verification complete: DGX-Spark GB10 confirmed
- β Documentation aligned with single-GPU unified memory architecture
- β Metrics framework adapted for single-GPU benchmarking
- β ADR 0001: Hardware clarification documented
- π’ M0 in progress: Establishing reproducibility baseline
Use Cases and Examples
Character Sprites
# Generate idle animation frames
dgx-pixels generate-animation \
--prompt "fantasy knight character" \
--frames 4 \
--type idle \
--output ./assets/characters/knight/Environment Tiles
# Generate seamless dungeon tiles
dgx-pixels generate-tileset \
--prompt "stone dungeon floor" \
--size 32 \
--seamless \
--variations 8Item Icons
# Batch generate item sprites
dgx-pixels batch items.txt \
--style 16bit \
--size 64 \
--output ./assets/items/See Implementation Plan Β§ Examples for more use cases.
Contributing
We welcome contributions! Please see CONTRIBUTING.md (coming soon) for guidelines.
Areas where we need help:
- Custom ComfyUI nodes for sprite-specific operations
- Bevy plugin development
- Training dataset curation
- Performance optimization
- Documentation improvements
License
This project is released under the MIT License. See LICENSE for details.
Component Licenses
- Stable Diffusion XL: CreativeML Open RAIL++-M License
- ComfyUI: GPL-3.0
- Diffusers: Apache 2.0
- Bevy: MIT/Apache 2.0
- FastAPI: MIT
All dependencies are open-source and permissively licensed.
Acknowledgments
- Stability AI for Stable Diffusion XL
- ComfyUI community for the excellent inference tool
- Bevy community for the game engine
- Civitai for pixel art model hosting
- Hugging Face for model hosting and Diffusers library
- NVIDIA for DGX-Spark hardware
Resources
Documentation
Communities
Research
- βGenerating Pixel Art Character Sprites using GANsβ (2022)
- LoRA: Low-Rank Adaptation of Large Language Models
- Stable Diffusion XL Paper
Support
For questions and support:
- Documentation: See docs directory
- Issues: GitHub Issues (coming soon)
- Discussions: GitHub Discussions (coming soon)
Status
Project Status: Documentation Phase β
Next Steps:
- Select architecture proposal
- Set up DGX-Spark environment
- Begin implementation following Implementation Plan
- Train initial custom models
Built with β€οΈ for game developers who want to focus on creating games, not drawing every pixel.