|
Starting today, three new text-to-image models from Stability AI are available on Amazon Bedrock: Stable Image Ultra, Stable Diffusion 3 Large, and Stable Image Core. These models significantly improve performance on multi-topic prompts, image quality, and typography, and can be used to quickly generate high-quality visuals for a variety of use cases, including marketing, advertising, media, entertainment, and retail.
These models excel at producing images of incredible realism, boasting excellent detail, color, and lighting, and solving common tasks such as rendering realistic hands and faces. The advanced rapid understanding of the models allows them to interpret complex instructions related to spatial reasoning, composition, and style.
Three new Stability AI models available on Amazon Bedrock cover a wide range of use cases.
Stable Image Ultra – Produces the highest quality, photorealistic output, perfect for professional print media and large format applications. Stable Image Ultra excels at rendering exceptional detail and realism.
Stable diffusion 3 large – Balances creation speed and output quality. Ideal for creating high-volume, high-quality digital assets such as websites, newsletters, and marketing materials.
Stable Image Core – Optimized for fast, low-cost image creation, making it perfect for quickly iterating concepts while ideating.
This table summarizes the main features of the model.
characteristic | Stable Image Ultra | Stable diffusion 3 large | Stable Image Core |
---|---|---|---|
Parameters | 16 billion | 8 billion | 2.6 billion |
input | Text | Text or image | Text |
Typography | Customized Large display |
Customized Large display |
Diversity and readability Various sizes and uses |
Visual aesthetics |
Realistic Image Output |
It’s very realistic More attention to detail |
Good rendering; Don’t care about details |
One of the major improvements of Stable Image Ultra and Stable Diffusion 3 Large over Stable Diffusion XL (SDXL) is the improved text quality of the generated images and the reduction of spelling and typographical errors thanks to the innovative Diffusion Transformer architecture. This architecture implements two separate sets of weights for images and text, but allows information to flow between the two modalities.
Here are some images created using these models.
Stable Image Ultra – Immediate: Photo, realistic, woman sitting in a field looking at a kite flying in the sky, stormy sky, highly detailed, concept art, complex and professional composition.
Stable Diffusion 3 Large – Prompt: cOmic style illustration, male detective standing under streetlight, noir city, trench coat, fedora, dark and rainy weather, neon signs, light reflecting on wet pavement, gloomy lighting with details.
Stable Image Core – Immediate: Professional 3D rendering of white and orange sneakers. Floating in the center, floating, high quality and realistic.
Use Cases for Amazon Bedrock’s New Stability AI Model
Text-to-image models offer innovative potential for businesses across a wide range of industries and can significantly streamline the creative workflow of marketing and advertising departments, enabling them to quickly produce high-quality visuals for campaigns, social media content, and product mockups. By accelerating the creative process, businesses can respond more quickly to market trends and shorten the time to market for new initiatives. These models can also enhance brainstorming sessions, providing an immediate visual representation of concepts that can spark further innovation.
For e-commerce businesses, AI-generated images can help create a variety of product showcases and personalized marketing materials at scale. In user experience and interface design, these tools can accelerate the design iteration process by quickly creating wireframes and prototypes. Adopting a text-to-image model can lead to significant cost savings, increased productivity, and a competitive advantage in visual communication across a variety of business functions.
Some use cases across various industries include:
Advertising and Marketing
- Stable Image Ultra for high-end brand advertising and realistic product showcases
- Stable Diffusion 3 Large for high-quality product marketing images and print campaigns
- Use Stable Image Core for quick A/B testing of visual concepts for your social media ads.
E-commerce
- Ultra stable image for high-end product customization and made-to-order items
- Stable Diffusion 3 Large is suitable for most product visuals on e-commerce sites.
- A robust image core to quickly generate product images and keep your listings up to date.
Media & Entertainment
- Stable Image Ultra for highly realistic key art, marketing materials, and game visuals
- Stable Diffusion 3 Large for environment textures, character art, and in-game assets
- A stable image core for rapid prototyping and concept art exploration.
Now let’s take a look at how the new model works in practice using the AWS Management Console. Then we’ll take a look using the AWS Command Line Interface (AWS CLI) and AWS SDKs.
Use the new Stability AI model in the Amazon Bedrock console
In the Amazon Bedrock console, select: Model approach Provides access to three new models in the navigation pane. Stability AI part time job.
Now that you have access, select it. video at playground This is the section of the navigation pane. For the model, I select. Stability AI and Stable Image Ultra.
When prompted, type the following:
A stylized picture of a cute old steampunk robot with in its hands a sign written in chalk that says "Stability AI models in Amazon Bedrock".
Leave all other options as default and select. run. A few seconds later, I got what I asked for. Here’s the image:
Using Stable Image Ultra with AWS CLI
While still on the console Image PlaygroundSelect the three small dots at the corners of the playground window. View API requests. This way, you can see the same AWS Command Line Interface (AWS CLI) commands that you just did in the console.
You need to change the model ID to use Stable Image Core or Stable Diffusion 3 Large.
The previous command outputs the image in Base64 format inside a JSON object to a text file.
To get the image with a single command, write the output JSON file to standard output and use: JQ A tool that can extract encoded images and decode them on the fly. The output is written to: img.png
file. The full command is:
Using Stable Image Ultra with AWS SDK
Here’s how to use Stable Image Ultra with the AWS SDK for Python (Boto3). This simple application asks for a text-to-image prompt interactively, then calls Amazon Bedrock to generate an image.
import base64
import boto3
import json
import os
MODEL_ID = "stability.stable-image-ultra-v1:0"
bedrock_runtime = boto3.client("bedrock-runtime", region_name="us-west-2")
print("Enter a prompt for the text-to-image model:")
prompt = input()
body = {
"prompt": prompt,
"mode": "text-to-image"
}
response = bedrock_runtime.invoke_model(modelId=MODEL_ID, body=json.dumps(body))
model_response = json.loads(response("body").read())
base64_image_data = model_response("images")(0)
i, output_dir = 1, "output"
if not os.path.exists(output_dir):
os.makedirs(output_dir)
while os.path.exists(os.path.join(output_dir, f"img_{i}.png")):
i += 1
image_data = base64.b64decode(base64_image_data)
image_path = os.path.join(output_dir, f"img_{i}.png")
with open(image_path, "wb") as file:
file.write(image_data)
print(f"The generated image has been saved to {image_path}")
This application writes the resulting image to: output
A directory that will be created if it doesn’t exist. To avoid overwriting an existing file, the code checks for an existing file and finds the first available file name. img_<number>.png
format.
More examples of how to use the stable diffusion model can be found in the code library in the AWS documentation.
Customer’s voice
Hear from Ken Hoge, Global Alliance Director for Stability AI, how Stable Diffusion models are reshaping the industry from text-image to video, audio, and 3D, and how Amazon Bedrock provides customers with a secure, scalable, all-in-one solution.
Step into a world where reading comes alive with Nicolette Han, Product Owner at Stride Learning. With support from Amazon Bedrock and AWS, Stride Learning’s Legend Library is using AI to transform the way children engage with and understand literature, creating amazing, safe illustrations for children’s stories.
Things to know
The new Stability AI models Stable Image Ultra, Stable Diffusion 3 Large, and Stable Image Core are available today in Amazon Bedrock in the US West (Oregon) AWS Region. With this launch, Amazon Bedrock offers a broad range of solutions to enhance creativity and accelerate content creation workflows. To understand the costs for your use cases, see the Amazon Bedrock pricing page.
More details about Stable Diffusion 3 can be found in the research paper detailing the underlying technology.
To get started, see the Stability AI Models section of the Amazon Bedrock User Guide. To learn how others are using generative AI in their solutions and learn from in-depth technical content, visit community.aws.
— Danilo