Check out our new GPU Glossary! Read now
November 20, 20244 minute read
How OpenArt scaled their Gen AI art platform on hundreds of GPUs

Companies building differentiated AI products often have proprietary ML components and workflows that can be challenging to deploy. Using Modal, OpenArt was able to build and scale complex image generation pipelines without compromising on customizability.

About OpenArt

OpenArt is a platform for AI image generation and editing. With a lean and agile team of engineers, OpenArt has grown into a platform with over 3 million monthly active users globally. Users on OpenArt can generate images with popular models, use proprietary fine-tunes to achieve certain visual effects, and share their own customized workflows with the community.

Live usage dashboard

AI rendition of your author’s cat, using OpenArt’s stylization and inpainting tools

Inflexibility of model API providers

OpenArt found that while API providers like Replicate and Fireworks worked for vanilla text-to-image generation, they were too inflexible for customized pipelines. OpenArt’s “secret sauce” was in their proprietary ComfyUI* workflows, which were behind sophisticated features (e.g. style transfer, facial expression editing, background extension) in their advanced image editing suite. These workflows were part of complex pipelines that involved much more than just sending a request to an image model. API providers, however, were built for basic use cases—even the ones that supported ComfyUI deployments didn’t support fully customizable workflows.

*ComfyUI is an open-source tool for assembling and executing advanced image generation pipelines. Below is a sample ComfyUI workflow with many interconnected nodes.

comfyui_sample

Hours-long deployment cycles on GCP

On the other side of the spectrum, OpenArt also tried setting up their own infrastructure on AWS and GCP. This was an incredibly slow process, however. It took hours to redeploy every time they made a change to their ComfyUI pipeline. This was due to the complex configuration interfaces, long wait times to acquire and spin up GPUs, and quota limits. As a fast-moving startup, OpenArt found this to be a dealbreaker.

It was really a pain to run those custom ComfyUI workflows on AWS or GCP. In order to deploy one workflow it would take hours. It was a very not smooth experience.
— Coco Mao, CEO and Co-founder, OpenArt

Fast, programmatic infrastructure on Modal

When exploring alternative solutions, Modal struck the balance between supporting OpenArt’s custom, high-code needs while still providing a clean developer experience to deploy and scale their product.

After iterating on a ComfyUI workflow locally, they could easily deploy it on Modal by:

  1. Defining a container image in Python that had their custom ComfyUI nodes installed.
  2. Defining a couple functions — one to launch ComfyUI as a subprocess, and one to execute a given ComfyUI workflow.
  3. Wrapping those functions in a Modal decorator that defined GPU requirements, the custom image, and a file mount containing the ComfyUI workflow.
  4. Using modal deploy on the command line to deploy the functions to the cloud.

By leveraging Modal’s lightweight, programmatic solution rather than a traditional setup on GCP, OpenArt was able to deploy in minutes rather than hours. This empowered the team to focus on innovation instead of infrastructure. Coco Mao, CEO of OpenArt, remarked, “We believe in building solutions that are not just powerful but also elegant in their simplicity. That’s what sets us apart.”

And because Modal worked with arbitrary code, images, and files, OpenArt’s engineering team was able to seamlessly integrate all of their proprietary ComfyUI workflows into the product. Complex pipelines were turned into sophisticated yet user-friendly image tools without overloading their tech stack.

As their customer base continued to grow, Modal’s autoscaling capabilities became a key piece of their infrastructure. When users were busy on the OpenArt platform, Modal scaled up to hundreds of GPU containers running their ComfyUI workflows without any additional work required on their part. Modal now powers 100+ workflows on OpenArt’s platform.

As a startup, you need to iterate on things quickly. So it’s really helpful when the developer experience and development speed is suddenly like 5x or 10x. It’s a lot easier to deploy a ComfyUI workflow because Modal is serverless, so it auto-scales really well.
— Coco Mao

An oversized team isn’t required to build scalable, custom AI solutions. OpenArt’s compact team demonstrates that smart tools and a drive for focus and simplicity are more than enough. Modal exists to help customers like OpenArt launch and scale the next generation of sophisticated AI products.

Ship your first app in minutes.

Get Started

$30 / month free compute