Real-Time Generative AI for Immersive Theater Performance

university_of_california_los_angeles · Media & Entertainment · 2025 · source Agentic: no · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Near-real-time generative AI for live immersive performance

UCLA OARC and REMAP needed a live-performance AI media pipeline that could turn audience phone sketches into 2D images and 3D meshes fast enough for a theater show, without failing during performances.

Constraints:

Architecture

UCLA used a serverless-first, event-driven AWS architecture. Mobile sketches came through Firebase and MacOS workstations into SQS, a Lambda helper sorted messages by pipeline, a processing Lambda validated and orchestrated pre-processing, SageMaker/Bedrock inference, and post-processing, and SNS/DynamoDB/SQS delivered results back to on-premises workstations for human review and display on Unreal Engine-powered LED shrines.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  A["Mobile sketch clients"] --> B["Firebase orchestration layer"]
  B --> C["MacOS workstations"]
  C --> D["SQS ingress queues"]
  D --> E["Lambda queue sorter"]
  E --> F["Inference sub-queues"]
  F --> G["Processing Lambda"]
  H["EFS dependency volume"] --> G
  P["CodeBuild deployment"] --> H
  G --> I["SageMaker AI endpoints"]
  G --> J["Amazon Bedrock models"]
  I --> N["S3 asset bucket"]
  N --> G
  G --> K["SNS completion topic"]
  K --> L["DynamoDB analytics table"]
  K --> M["Final asset queue"]
  M --> C
  C --> O["Performance media servers"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Mobile sketch clients Audience and performer phones used to draw input sketches. Firebase orchestration layer
Firebase orchestration layer Low-latency entry layer outside AWS for sketch submission. Mobile sketch clients, MacOS workstations
MacOS workstations On-premises systems that initiate workflows, review outputs, and retrieve finished assets. Firebase orchestration layer, SQS ingress queues, Final asset queue, Performance media servers
SQS ingress queues Message buffer for incoming sketches and metadata. MacOS workstations, Lambda queue sorter
Lambda queue sorter Sorts incoming messages into inference-specific sub-queues. SQS ingress queues, Inference sub-queues
Inference sub-queues Pipeline-specific queues for 2D image, 3D mesh, and other inference jobs. Lambda queue sorter, Processing Lambda
Processing Lambda Core orchestration function for validation, concurrency, pre-processing, inference, and post-processing. Inference sub-queues, EFS dependency volume, SageMaker AI endpoints, Amazon Bedrock models, SNS completion topic
EFS dependency volume Hosts large Python/PyTorch dependencies mounted by Lambda. Processing Lambda, CodeBuild deployment
SageMaker AI endpoints Custom HuggingFace/diffusion/VLM/3D model hosting across GPU endpoints. Processing Lambda, S3 asset bucket
Amazon Bedrock models Managed access to foundation models such as Claude, Nova Canvas, and Stable Diffusion. Processing Lambda
SNS completion topic Fans out completion events to email, SQS, and analytics updates. Processing Lambda, DynamoDB analytics table, Final asset queue
DynamoDB analytics table Stores analytics updates after inference completion. SNS completion topic
Final asset queue Queue polled by workstations to retrieve finished media assets. SNS completion topic, MacOS workstations
S3 asset bucket Stores generated image assets for Lambda retrieval. SageMaker AI endpoints, Processing Lambda
Performance media servers Unreal Engine display infrastructure for LED shrines. MacOS workstations
CodeBuild deployment CI/CD job updating dependencies and Lambda code across environments. EFS dependency volume

Data flow

Audience sketches and metadata enter through Firebase/on-premises workstations and are posted to SQS. Lambda sorts them into inference-specific sub-queues. A processing Lambda validates the request, manages concurrency, runs pre-processing and inference through SageMaker AI endpoints and Bedrock models, posts completion events to SNS, updates DynamoDB, and places final work on a queue polled by MacOS workstations that retrieve assets for media presentation.

3 supporting quotes
“User sketches were passed to the microservice using a low-latency Firebase orchestration layer”article, stated
“work was coordinated through a series of processing steps transforming user sketches into 2D images and 3D meshes.”article, stated
“The on-premises MacOS workstations polled the final queue to retrieve new assets as they finished.”article, stated

Why this architecture

The architecture fits a bursty live-event workload: queues and Lambda isolate pipelines, SageMaker hosts custom GPU models without managing 20+ EC2 instances, Bedrock reduces operational load for managed foundation models, and human operators retain control through dashboards and review loops.

3 supporting quotes
“The sorting mechanism let the application precisely control its processing rate, so busy pipelines did not block new messages”article, stated
“Amazon SageMaker AI met all our criteria, with straightforward configuration, simple and reliable deployment, and an integrated load balancing service.”article, stated
“Amazon Bedrock offered simplified and managed access to foundation models”article, stated

Models used: DeepSeek VLM · Anthropic Claude 3.5 Sonnet · Amazon Nova Canvas · Stable Diffusion 3.5 · SDXL · SPAR3D · ControlNet · Yamix-8 · CSGO · IP Adapter · InstantID · antelopev2

Scale

Alternatives considered (roads not taken)

Deploy many on-demand EC2 GPU instances

Rejected because: Obtaining enough on-demand instances was challenging and maintaining 20+ hosts created too much burden.

“obtaining the necessary on-demand instances was challenging, and maintaining that many hosts created an excessive maintenance burden.”article, stated

Use EKS for model hosting

Rejected because: The team considered EKS but preferred SageMaker AI because it was faster to configure for this project.

“It is great at quick deployments and seamlessly scalable”article, stated
“we felt that Amazon SageMaker AI was the right choice for this project because it was fast to configure.”article, stated

Automated post-processing validation for generated images

Rejected because: The initial deployment relied on human review due to time constraints, while automated guardrail/object-detection validation was deferred.

“Since there was a human-in-the-loop, we did not perform automated post-processing on the images.”article, stated
“In the future, we look to validate assets returned by models in SageMaker AI endpoints using guardrails in Amazon Bedrock”article, stated

Manual code deployment to Lambda

Rejected because: CodeBuild automation reduced manual deployment/update risk across environments.

“obviated the need for manual code deployments and updates, reducing the risk that entails.”article, stated

Patterns

tool-use-orchestration (orchestration)

Lambda orchestrates multiple model services and specialized inference pipelines to transform sketches into images, textures, and 3D meshes.

“provided the logic to prepare user sketches for inferencing. This function did the validation, error/success messaging, concurrency handling, and orchestration”article, stated

human-in-the-loop-gate (governance)

On-premises workstations and dashboards supported human review and intervention before generated assets reached the stage displays.

“Several on-premises MacOS workstations on the left of the diagram were responsible for initiating workflows, watching for job completions, human in the loop review, and for sending finished assets back to the performance media servers.”article, stated

cost-aware-routing (operations)

The team selected smaller/larger GPU endpoints by pipeline need and added scheduled endpoint shutdown to control SageMaker costs.

“SageMaker AI proved reliable for real-time inference during live performances, it also represented the largest share of our project costs—approximately 40% of total cloud spend.”article, stated
“This simple automation step stopped resources from being left running unintentionally, helping us maintain cost predictability without sacrificing performance.”article, stated

observability-tracing (operations)

The management dashboard surfaced SQS and CloudWatch metrics so operators could see job queues and purge messages.

“The dashboard also contained metrics on jobs running in Amazon SQS and Amazon CloudWatch Logs so that the crew could purge messages from the pipeline.”article, stated

fallback-degradation (reliability)

The system was designed around fault tolerance and high availability because graceful degradation was not acceptable for the live show.

“The AWS GPU resources had to be fault tolerant and highly available during rehearsals and performances, graceful degradation was not an option”article, stated

Tradeoffs

Use SageMaker AI for most custom model hosting.

Chose SageMaker AI endpoints over Managing 20+ EC2 instances or using EKS.

Rationale: SageMaker AI met reliability, configuration, deployment, and load-balancing criteria with less maintenance burden for the live event.

“Amazon SageMaker AI met all our criteria, with straightforward configuration, simple and reliable deployment, and an integrated load balancing service.”article, stated
“maintaining that many hosts created an excessive maintenance burden.”article, stated

Combine custom SageMaker models with managed Bedrock models.

Chose Hybrid SageMaker AI plus Bedrock inference over All-custom model hosting or all-managed foundation models.

Rationale: The pipeline needed fine-grained control for open-source/custom models and managed serverless access for foundation models.

“with Amazon Bedrock providing managed serverless access to models such as Nova Canvas, Stable Diffusion 3.5, and Claude 3.5 Sonnet.”article, stated
“Amazon SageMaker AI provided complete machine learning lifecycle control for open source models from HuggingFace.”article, stated

Generate lower-resolution images before upscaling.

Chose Low-resolution generation plus Bedrock/Stable Diffusion upscaling over Generating final-resolution assets directly on larger endpoints.

Rationale: The staged approach reduced inference time and allowed smaller SageMaker instance types without sacrificing final quality.

“lower-resolution images were generated to reduce inference time.”article, stated
“This approach offloaded part of the inference workload, enabling us to run smaller Amazon SageMaker AI instance types without sacrificing quality or speed.”article, stated

Gotchas (what bit them)

Large ML dependencies exceeded Lambda layer limits and caused cold-start latency.

Root cause: PyTorch and related dependencies grew to about 5GB, requiring EFS-mounted dependencies at runtime.

Resolution: The team mounted EFS to Lambda and accepted startup latency rather than changing the development process late in the project.

“Growing up to 5GB in size, these dependencies were too large to fit in Lambda layers. We used Amazon EFS to host the dependencies in a separate volume mounted to the Lambda function at run time.”article, stated
“However, we did not implement it because it required some adjustments to our development process late in the project.”article, stated

Manual infrastructure configuration created avoidable deployment error risk.

Root cause: Many AWS services were configured manually during a rapid creative/academic project.

Resolution: The postmortem recommends CloudFormation or similar infrastructure-as-code automation for future iterations.

“Many developers follow a development, staging, production pipeline to make modifications and enhancements, so automating the configuration of services will reduce errors created compared to a manual deployment.”article, stated
“Many developers follow a development, staging, production pipeline to make modifications and enhancements, so automating the configuration of services will reduce errors created compared to a manual deployment.”article, stated

Idle GPU endpoints can dominate project spend.

Root cause: SageMaker AI endpoints were expensive when left running during rehearsals/development or idle windows.

Resolution: Nightly EventBridge/Lambda shutdowns stopped unused endpoints and improved cost predictability.

“During rehearsals and development, we observed that idle or unused SageMaker AI endpoints could be a major source of cost escalation. To mitigate this, we implemented a nightly automated shutdown process using Amazon EventBridge scheduler and AWS Lambda.”article, stated
“This simple automation step stopped resources from being left running unintentionally, helping us maintain cost predictability without sacrificing performance.”article, stated

Evaluation

The deployment was evaluated against live-performance constraints: concurrency, mean round-trip time, SageMaker processing time, availability during performances, and operational manageability through dashboards and rehearsals.

Metrics: Minimum 80-user concurrency · Mean round-trip time under 2 minutes · SageMaker job initiation to asset-return time · Successful performances · Cost share and endpoint idle cost · Operator visibility into queues/logs

3 supporting quotes
“* The microservices had a strict minimum concurrency requirement of 80 mobile phone users for each performance (accommodating 65 audience members plus 12 performers)”article, stated
“* The mean round-trip time (MRTT) from mobile phone sketches to media presentation had to be under 2 minutes to be ready as the performance was happening and provide optimal audience experience”article, stated
“Average processing times, measured from Amazon SageMaker AI job initiation to the return of generated assets to AWS Lambda”article, stated

Outcomes

The deployment supported 7 performances, about 500 total audience members, up to 65 audience members at once plus 12 performers, 80 mobile users required per performance, 24 SageMaker endpoints, 20-60 second SageMaker processing windows, and under-2-minute sketch-to-display MRTT.

3 supporting quotes
“The workflows also included final processing routines specific to each output type: overlaying cast member images at varying positions on backgrounds, converting custom poses into texture objects, and preparing meshes for rendering in Unreal Engine.”summary, stated
“OARC successfully designed and implemented a solution for 7 performances, as well as the many playtests and rehearsals leading up to them.”article, stated
“By making a conscious design choice to use AWS generative AI services and AWS Managed Services for REMAP’s immersive production of the musical Xanadu, we were able to demonstrate that it is possible to support new and dynamic forms of entertainment with AWS.”article, stated