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:

  1. Rapid Prototyping (1-2 weeks): Simple CLI + Automatic1111 for quick validation
  2. Balanced Production (4-6 weeks): ComfyUI + FastAPI + MCP integration
  3. πŸ†• Rust TUI + Python (5-6 weeks): Fast TUI with side-by-side model comparison (NEW RECOMMENDED)
  4. Advanced Enterprise (8-12 weeks): Full microservices with Kubernetes, MLOps, and web UI

See Architecture Proposals for detailed comparisons.

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

  1. Research Findings - Comprehensive research on AI pixel art generation, DGX-Spark capabilities, and integration technologies
  2. Architecture Proposals - Four detailed architecture proposals with pros/cons/timelines
  3. Technology Deep Dive - In-depth technical documentation on SDXL, LoRA, ComfyUI, and optimizations
  4. Bevy Integration - Complete guide for integrating with Bevy game engine
  5. Training Roadmap - Strategy for training custom models and maintaining quality
  6. Implementation Plan - Step-by-step implementation guide for all architecture paths

NEW: Rust + Python Stack

  1. Rust-Python Architecture - Hybrid Rust TUI + Python backend design with ZeroMQ IPC
  2. TUI Design - Complete TUI mockups, workflows, and side-by-side model comparison
  3. Playbook Contribution - Contributing to dgx-spark-playbooks repository

NEW: Project Management & Operations

  1. Hardware Specification - Verified DGX-Spark GB10 specifications and topology
  2. Metrics Framework - Performance, quality, and observability metrics
  3. Roadmap - Milestone-based development roadmap (M0-M5)
  4. RFD: GPT-5 Feedback - External review and recommendations
  5. ADR 0001 - Hardware clarification: DGX-Spark vs DGX B200

Technology Stack

Core Technologies

ComponentTechnologyPurpose
Base ModelStable Diffusion XL 1.0Image generation foundation
Fine-tuningLoRA (Low-Rank Adaptation)Custom style training
InferenceComfyUIFast, flexible generation workflows
TrainingKohya_ss / DiffusersLoRA training pipeline
APIFastAPIREST API and orchestration
IntegrationModel Context Protocol (MCP)Bevy communication
Game EngineBevy 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/
    pass

See Bevy Integration Guide for complete details.

Performance Benchmarks

On NVIDIA DGX-Spark GB10 (verified hardware):

OperationExpected TimeDetails
Inference (SDXL + LoRA)2-4s1024x1024 image @ FP16
Batch Generation15-25/minMultiple sprites (batch=8)
LoRA Training2-4 hours50 images, 3000 steps @ FP16
Model Loading<10sSDXL base + LoRA in unified memory
Zero-Copy Transfers<1ΞΌsCPU↔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

MilestoneStatusGoal
M0 β€” Foundation🟒 In ProgressHardware verification, reproducibility, baselines
M1 β€” Core Inferenceβšͺ PlannedSingle-GPU SDXL optimization
M2 β€” Interactive TUIβšͺ PlannedRust TUI with ZeroMQ + Sixel preview
M3 β€” LoRA Trainingβšͺ PlannedCustom model fine-tuning pipeline
M4 β€” Bevy Integrationβšͺ PlannedMCP-based game engine integration
M5 β€” Productionβšͺ PlannedObservability, 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 8

Item 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:

  1. Select architecture proposal
  2. Set up DGX-Spark environment
  3. Begin implementation following Implementation Plan
  4. Train initial custom models

Built with ❀️ for game developers who want to focus on creating games, not drawing every pixel.