AI Portrait Pipeline

A reusable framework for running multi-user experiences on Pixel Plaza via a QR code. Three experiences on it reached 12,000+ people.

AI Portrait Pipeline

What it is

After we installed Pixel Plaza, a ring of 12 dual-sided LED totems in Sunderland city centre, the next problem was content. The client wanted a steady run of new interactive activations around events like the Women’s Rugby World Cup, the Stages music festival and Christmas. Building each one from scratch would have been slow and fragile, so I designed and built one pipeline that every experience plugs into.

A new experience needs only three things: a mobile web UI, a generation step and a display component for the totems. The generation step can be an AI workflow or something else entirely. Everything in between is shared and already proven in public: QR onboarding, user sessions, the queue, GPU scheduling across machines, post-processing, delivery to the phone and the hand-off to the totems.

Pipeline diagram: mobile web frontend, local/cloud AI backend and totem display application
The pipeline, from QR code to totem

Mobile web frontend

Users scan a QR code on a totem and land on a mobile web app. There’s nothing to install, which matters for foot traffic in a public square. The core flow is shared across experiences:

  • Capture: take a selfie in the browser and retake it until you’re happy with it.
  • Configure: pick the generation parameters the experience exposes, such as team, position, hairstyle or character style.
  • Submit and wait: the job joins the queue and the UI shows your position and progress.
  • Review: if the result isn’t right, send it back into the queue for another variation. If it is, accept it.
  • Deliver: the accepted image downloads to the phone for sharing and goes to the totems at the same time.

Each experience gets its own UI skin and parameter set on top of this flow, so a new activation is mostly design work rather than new infrastructure.

Rugby AI Portraits mobile UI: hair style and skin tone selection
The Rugby AI Portraits UI.
Stages mobile mixer UI: effects pad and volume slider
The Stages mixer, built on the same web frontend. Up to six people at a time each control one instrument.

Local AI backend

Most of the engineering went into the backend, which has to serve many people at once during peak event traffic.

  • Queueing: every request becomes a job in a central queue, which spreads the load and gives each user a fair, visible place in line. Re-rolls go back into the same queue.
  • Distributed local generation: jobs are dispatched to GPU workers across several machines, including the installation’s two on-site render servers. Everything runs locally, so there are no per-image cloud costs, no dependency on outside APIs and very little network latency.
  • ComfyUI workflows as the generation step: each experience’s generation logic is a ComfyUI workflow driven from Python, so the creative pipeline can change without touching the serving code. For the portraits this covers image generation, face substitution, pose correction and compositing.
  • Post-processing: background removal (rembg or similar) cuts each character out cleanly so it can be composited over the animated totem backgrounds.

Fine-tuned and optimized models

The quality bar was a consistent, art-directed style across thousands of generations, from nothing more than a selfie and a few choices. For each AI experience I trained a custom LoRA with ai-toolkit on reference images from the creative team, which defined the target look. Because the style was trained into the model rather than coaxed out with prompts, outputs stayed on-brand across every combination of parameters.

Speed mattered just as much. People were standing in a public square waiting for their result, and a slow queue kills a live activation. Optimizing the models and the ComfyUI workflow cut a full portrait from about 30 seconds to 6–7 seconds on a single Nvidia RTX 4080. That figure covers generation, face substitution, pose correction, background removal and compositing. Spread across several GPU workers, it kept the queue moving through the busiest hours.

AI rugby portrait: player in a purple kit running with the ball
AI rugby portrait: player in a red kit sprinting with the ball
AI rugby portrait: player in a blue kit breaking forward
AI rugby portrait: player in a gold and green kit holding the ball

Rugby portraits straight out of the pipeline, backgrounds already removed. The same LoRA holds one style across different teams, positions and body types.

Totem display application

Accepted images go to a display component on the render servers that drives the 24 LED screens. Each experience has its own presentation, from rugby heroes making a dramatic entrance to a rotating gallery of festive elves. Images arrive continuously from many users, so this component schedules and rotates them across the ring and gives every participant their moment on the totems.

Content for all 24 totem screens: rugby portraits composited over animated red light-streak backgrounds
Content for all 24 screens: accepted portraits composited over the animated backgrounds and rotated around the ring.

Not only AI

The same framework ran the Stages collaborative DJ & VJ experience, with no image generation at all. A real-time procedural techno set replaced the generation step, and the session and queue layer handed each new user a free instrument or held them in line until one opened up. That’s the point of the pipeline: Pixel Plaza can take on new content quickly, and each new activation reuses the proven multi-user backend while its effort goes into the parts the audience sees.

Stages collaborative DJ and VJ experience on the Pixel Plaza totems
Stages collaborative DJ & VJ: real-time procedural techno whose MIDI drives the totem visuals, mixed live by the audience from their phones.

What I did

—

Came up with the pipeline as a way to roll out new Pixel Plaza content fast, instead of building each activation from scratch.

—

Designed the architecture: a mobile web frontend, a queued generation backend and a totem display app, each swappable per experience over shared plumbing.

—

Built the Python backend: job queue, user sessions, re-rolls, and dispatching jobs to GPU workers across several machines.

—

Built the ComfyUI workflows for generation, face substitution, pose correction, background removal and compositing, driven from Python.

—

Trained a custom LoRA per experience with ai-toolkit to lock in the art-directed style, then optimized the models and workflow from ~30s to 6–7s per image on a single RTX 4080.

—

Built the mobile web UIs in JS/CSS and the display component that schedules accepted images across the 24 LED screens.

Outcomes

12,000+
people across the 3 experiences
19,000+
AI portraits generated live
6–7s
per portrait, locally, on one RTX 4080