AI Cloud Architect

How Synthesia optimizes generative AI video inference on Amazon EC2 G7e instances

AWSHow-to by Moises Hernandez, Hanno Bever, Emanuele Levi and Pierre LienhartAWS Architecture Blog

This post introduces a video decoding optimization technique that we have ideated in collaboration with Synthesia Research Engineering team, which we call Asynchronous Frame Generation Pipeline. Adopting this technique allows you to overlap GPU compute, device-to-host (D2H) data transfer, and host-side post-processing. In this post, we apply this technique to the VAE decoder of a Wan video generation model as an example, where our benchmarks on G7e show increased GPU kernel utilization from…

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

A chunked-decoding technique overlaps GPU compute, device-to-host copies and host-side frame writes, raising GPU kernel utilization from 82% to 99.9% in AWS benchmarks.

Who it is for

Teams running chunked video generation models such as Wan on EC2 G7e that write decoded frames to storage.

Key points

  • AWS benchmark: 8.2% lower decoding latency on g7e.2xlarge for the Wan 2.2 14B VAE decoder (21.99s to 20.17s mean per video)
  • Uses two CUDA streams, pinned host memory buffers and a dedicated worker thread; no change to model weights
  • Benchmark is on one GPU and unoptimized Diffusers model; AWS says gains may be larger on compiled models
  • Pricing cited: $3.36 per GPU on-demand in Ohio, giving an estimated $896 saving per 1,000 hours of video (AWS calls this theoretical)

The same at other vendors

Timeline

Posts about Amazon EC2 G7e, oldest first.

  1. Generally availableAmazon EC2 G7e instances are now generally available · AWS · Announcement
  2. Region expansionAmazon EC2 G7e instances now available in US West (Oregon) region · AWS · Announcement
  3. Region expansionAmazon EC2 G7e instances now available in Asia Pacific (Seoul) and Europe (Spain) regions · AWS · Announcement
  4. This postHow Synthesia optimizes generative AI video inference on Amazon EC2 G7e instances
  5. Region expansionAmazon EC2 G7e instances now available in additional regions · AWS · Announcement