Learn About Generative AI

Generative AI has grown exponentially during the last two years, changing the landscape of creative work. Once thought of as the domain of humans, creative content is now becoming automated by artificial intelligence (AI), using large language and image models.

Generative AI has and will continue to have an impact within various industries:

  • Programing (text to code)
  • Advertising, social media, image generation (text to image and text to text)
  • Video editing and video generation (text to video)
  • 3D modeleling and 3D scenes (text to 3D models)
  • Games, music, audio, science, etc.

Many of these models are open source and can run on compute instances, for which we are sharing a terraform script that you can use for text and image generation. The script will install on top of a GPU, Stable Diffusion (text to image), Bloom (text to text or text to code), and DreamBooth.

  • Stable Diffusion is a state-of-the-art, text-to-image model that generates images from text.
  • Bloom is an open, multilingual large language model with 176 billion parameters. It was trained using the NVIDIA AI platform, with text generation in 46 languages and 13 programming languages.
  • DreamBooth lets you fine-tune a stable diffusion model to generate new labels based on a small sample of images. The idea is that you can use 20–30 images, for example, and train the model so it can generate something new.

All the instructions to build the GPU machine and use the different apps are in the GitHub repository.


This architecture shows generative AI models deployed to an OCI GPU instance.

A GPU machine is perfect for the execution of these models as the terraform script will install all the drivers and dependencies on the OS. The three applications are installed as services, so they’ll start up with the instance.

Note that the applications are not secured, so you will have to create an SSH tunnel to access them safely from the web apps.


To use the scripts, you need to install:

  • OCI command line interface (CLI) for tenant authentication.
  • SSH-keygen to generate the SSH keys to access to the instance.
  • Terraform to create all the resources.

This architecture supports the following components:

  • Virtual cloud network (VCN) and subnet

    A VCN is a customizable, software-defined network that you set up in an Oracle Cloud Infrastructure region. Like traditional data center networks, VCNs give you complete control over your network environment. A VCN can have multiple non-overlapping CIDR blocks that you can change after you create the VCN. You can segment a VCN into subnets, which can be scoped to a region or to an availability domain. Each subnet consists of a contiguous range of addresses that don't overlap with the other subnets in the VCN. You can change the size of a subnet after creation. A subnet can be public or private.

  • GPU compute

    Oracle Cloud Infrastructure Compute provides NVIDIA GPU–based, bare metal and virtual machine instances for a variety of use cases, from mainstream graphics and video to the most demanding AI training and HPC workloads. Remote direct memory access (RDMA) communication between instances supports large GPU clusters with 1,600 GB/sec of bandwidth for workloads such as model training, inference computation, physics-based modeling and simulation, image rendering, and massively parallel HPC applications.