We are excited to announce that Stable AI’s newest and most advanced text-to-image model, Stable Diffusion 3.5 Large, is now available on Amazon SageMaker JumpStart. This new state-of-the-art image generation model trained on Amazon SageMaker HyperPod enables AWS customers to generate high-quality images from text descriptions with unprecedented ease, flexibility, and creativity. . By adding Stable Diffusion 3.5 Large to SageMaker JumpStart, we are taking another important step in democratizing access to advanced AI technologies and enabling businesses of all sizes to harness the power of generative AI. I took a step.
This post provides an implementation guide for subscribing to Stable Diffusion 3.5 Large with SageMaker JumpStart, deploying a model in Amazon SageMaker Studio, and generating images using text-to-image prompts.
Stable Diffusion 3.5 major features and use cases
With 8.1 billion parameters, superior quality and fast compliance, Stable Diffusion 3.5 Large is the most powerful model in the Stable Diffusion family. This model excels at creating diverse, high-quality images across a wide range of styles, making it an excellent tool for media, gaming, advertising, e-commerce, corporate training, retail, and education. For ideation, Stable Diffusion 3.5 Large lets you accelerate storyboarding, concept art creation, and rapid visual effects prototyping. For production, you can quickly generate high-quality 1 megapixel images for campaigns, social media posts, and advertisements, saving time and resources while maintaining creative control.
Stable Diffusion 3.5 Large offers users nearly endless creative possibilities, including:
- Enhance creativity and photorealism – Generate great visuals with highly detailed 3D images that include details such as lighting and textures.
- Excellent multi-subject proficiency – Offers unparalleled ability to generate images with multiple subjects, perfect for creating complex scenes.
- Increased efficiency – Streamline operations and save time and money with fast, accurate, and high-quality content production. Despite its power and complexity, Stable Diffusion 3.5 Large is optimized for efficiency, providing accessibility and ease of use for a wide range of users.
Solution overview
SageMaker JumpStart allows you to choose from a wide selection of publicly available foundational models (FMs). ML practitioners can deploy FM on a dedicated SageMaker instance from a network-isolated environment and customize their models using Amazon SageMaker for model training and deployment. You can now discover and deploy large-scale models in Stable Diffusion 3.5 with a few clicks in SageMaker Studio or programmatically through the SageMaker Python SDK. This allows you to log Amazon SageMaker Pipelines, Amazon SageMaker Debugger, and containers. Models are deployed in a secure environment in AWS and under the control of a Virtual Private Cloud (VPC), which helps provide data security.
The Stable Diffusion 3.5 Large model is currently available in the following AWS Regions: US East (N. Virginia, Ohio), US West (Oregon), Asia Pacific (Osaka, Hong Kong), China (Beijing), Middle East (Bahrain), Africa (Cape Town), Europe (Milan, Stockholm).
SageMaker Studio is an integrated development environment (IDE) that provides a single web-based visual interface and access to dedicated tools for all machine learning (ML) tasks, from data preparation to building, training, and deploying ML. ) development steps. model. For more information about how to get started and set up SageMaker Studio, see Amazon SageMaker Studio.
Prerequisites
AWS Identity and Access Management (IAM) role AmazonSageMakerFullAccess
. To successfully deploy your model, ensure that your IAM role has the following three permissions and has permission to create AWS Marketplace subscriptions in the AWS account you use.
aws-marketplace:ViewSubscriptions
aws-marketplace:Unsubscribe
aws-marketplace:Subscribe
Subscribe to Stable Diffusion 3.5 Large model package
You can access SageMaker JumpStart from the SageMaker Studio home page by selecting JumpStart in the (Prebuilt and Automated Solutions) section. On the JumpStart landing page, you can explore various resources such as solutions, models, and notebooks. You can search for a specific provider. The following screenshot shows all the models with Stability AI on SageMaker JumpStart.
Each model is provided with a model card that contains important information such as model name, tweak features, provider, and a brief description. To find out, Stable diffusion 3.5L For models, you can browse the Foundation Model: Image Generation carousel or use the search feature. Select Stable Diffusion 3.5 Large.
Next, subscribe to Stable Diffusion 3.5 Large and follow these steps:
- Open the AWS Marketplace model list page using the link available from the SageMaker JumpStart sample notebook.
- select on list Continue subscribing.
- in Subscribe to this software Review and select pages accept offer If you and your organization agree to the EULA, pricing, and support terms.
- choose Go to settings Click to start configuring the model.
- Once you select a supported region, you will see the model package Amazon Resource Name (ARN) that you must specify when creating the endpoint.
Note: If you don’t have the necessary permissions to view or subscribe to models, contact your AWS administrator or procurement representative. Many companies may restrict AWS Marketplace permissions to control the actions that users can perform in the AWS Marketplace management portal.
Deploy the model with SageMaker Studio
You can now create an endpoint (using the model package ARN from AWS Marketplace) and deploy it by following the example notebook in Stability AI’s GitHub repository. ModelPackage
.
Stable Diffusion 3.5 Large must be deployed on an Amazon Elastic Compute Cloud (Amazon EC2) ml.p5.48xlarge instance.
Generate images using text prompts
For more information, see the Stable Diffusion 3.5 Large documentation. From the notebook example, the code to generate the image is:
Below are examples of images generated from various prompts.
prompt: Photo, pink rose flowers in the dusk, glowing tile house in the background. |
prompt: The words “AWS x Stability” in thick blocky script surrounded by roots and vines on a pure white background. The scene is lit with a flat light, creating a reflective scene with a minimal color palette. quilling style. |
prompt: Expressionist painting, silhouette profile of a student sitting at a desk and absorbed in reading a book. Her thoughts are artistically connected to the stars and the vast universe, symbolizing the expansion of knowledge and the infinite mind. |
prompt: Vibrant street scene of a neon-lit alleyway in Tokyo at night. Steam rises from the stalls and colorful neon signs illuminate the rain-slicked pavement. |
prompt: A 3D animation scene of an adventurer traveling the world with his dog. |
cleaning
When you’re finished, you can delete the endpoint to free up the EC2 instances associated with it and stop billing.
Get a list of SageMaker endpoints using the AWS Command Line Interface (AWS CLI) as follows:
Next, delete the endpoint.
conclusion
In this post, we walked you through the steps to subscribe to Stable Diffusion 3.5 Large in SageMaker JumpStart, deploy the model in SageMaker Studio, and generate different images using Stability AI’s latest text-to-image model .
Start creating amazing images today with Stable Diffusion 3.5 Large from SageMaker JumpStart. For more information about SageMaker JumpStart, see SageMaker JumpStart Pretrained Models, Amazon SageMaker JumpStart Foundation Models, and Getting Started with Amazon SageMaker JumpStart.
If you want to explore advanced prompt engineering techniques that improve the performance of your Stability AI text-to-image models and make it easier to create stunning images, see Understanding Prompt Engineering: Creating Stability AI Models on AWS See “Unleash your potential.”
About the author
Tom Yemington He is a senior GenAI model specialist focused on helping model providers and customers scale their generative AI solutions on AWS. Tom is a Certified Information Systems Security Professional (CISSP). Outside of work, Tom races vintage cars and teaches people how to race as an instructor at track day events.
Isha Dua is a senior solutions architect based in the San Francisco Bay Area who works with GENAI model providers to help customers optimize their GENAI workloads on AWS. She helps enterprise customers grow by understanding their goals and challenges, teaching them how to build applications in a cloud-native manner while ensuring resiliency and scalability. She is passionate about machine learning technology and environmental sustainability.
Master Huang Bo He is a Senior Applied Scientist for Generative AI at Amazon Web Services, where he works with customers to develop and implement generative AI solutions. Boshi’s research focuses on advancing the field of generative AI through the development of automated prompt engineering, adversarial attack and defense mechanisms, inference acceleration, and responsible and reliable visual content generation methods.