James L. Elia headshot

James L. Elia

Project #3: Aesthetic Selection in AI Image Generation

GitHub Repo

Built With: HPC (Slurm) | Python 3 | PyTorch | Diffusers (SDXL) | Matplotlib | X11 Forwarding

Practical Objective: Create an interactive workshop for the 2025 Envisioning AI at Yale Symposium applying evolutionary principles to AI image generation.

Learning Objective: Build fluency with high-performance computing and deployment of pre-built generative AI models.

Generative AI as an Evolutionary System

To bridge a conceptual gap between machine learning and evolution, I designed this pipeline to apply selection to the latent space of a diffusion model. The core loop of the exhibit:

As the loop continues, we theoretically generate increasingly pleasing images (at least, according to the crowd). We can map the parameters directly to evolutionary principles:

HPC Architecture and Headless Interaction

Running Stable Diffusion XL on several images in real-time requires VRAM-rich compute that exceeds standard local capabilities. I deployed this workflow on Yale’s McCleary High-Performance Computing cluster, which presented unique engineering challenges regarding resource allocation and interactive visualization in a headless environment.

While I built the backend, YCRC's Sam Friedman helped me set up X11 forwarding so attendees had an interactive display:

The biggest engineering hurdle was dependency management. Getting the "shifting sands" of modern AI libraries to play nicely with the rigid environment of an HPC cluster was a crash course in dependency hell.

Three sets of three AI generated images showing evolutionary progression
The Evolutionary Loop: Three iterations of three prompts compete. Images selected by the audience become the input for the next generation, creating a directed evolutionary path through the model's latent space. Winners outlined with green.
← Project #2 Project #4 →