AWS Logo
Menu

AWS BedRock - Boto3 Demo - Stability AI

Explore the AWS Bedrock offering of Image Generation Model from Stability.ai

Published Mar 11, 2024

Previous Blog on this Learning Series

All 10 Blogs are under Learning series

Github Link - Notebook

https://github.com/jayyanar/learning-aws-bedrock/blob/main/blog8-stabilityAI/Bedrock_stability_Boto3.ipynb

Environment Setup

I am using vscode local environment with AWS Credential configured.

Install Latest Python

Upgrade pip

Install latest boto3,awscli, boto3-core

Load the Library

Stability AI - SDXL Model

SDXL, a high-quality image generation model, excels in open photorealism, allowing diverse art styles without imposing a specific 'feel.' SDXL 1.0 emphasizes vibrant, accurate colors with improved contrast, lighting, and shadows in native 1024x1024 resolution. Notably, it tackles challenging concepts like hands, text, and spatial arrangements. Developed by Stability AI, a leading open-source generative AI company, SDXL finds applications in artwork generation, creative tooling, and education. This diffusion-based text-to-image model, version 1.0, showcases stability and proficiency, generating detailed images based on text descriptions, and supporting tasks like inpainting, outpainting, and image-to-image translations with a maximum token limit of 77.

Set the Prompt

Configure the Model configuration

Invoke the Model

Parse the response for Image

Store the Image

Image Output

Stability SDK - Basic Inference

DreamStudio introduces a user-friendly interface designed for crafting images through the cutting-edge Stable Diffusion image generation model. This model, known for its speed and efficiency, seamlessly translates text into captivating images, demonstrating a profound understanding of the intricate relationships between words and visual elements. In this tutorial notebook, we will guide you through the process of setting up the Stability SDK package, providing you with the tools to harness the power of our API for fundamental inference calls. Explore the potential of image creation and unleash your creativity with DreamStudio and the Stable Diffusion model.

Notebook to Play

Code to Play

Comments