This topic describes how to use the Stable Diffusion WebUI tool in PAI ArtLab.
Log on to the PAI ArtLab console.
Prerequisites
You have activated PAI ArtLab and granted the required permissions. For more information, see Activate PAI ArtLab and grant permissions.
(Optional) You have claimed free trial resources or a coupon, or purchased a resource plan. For more information, see PAI ArtLab billing.
Use your resources, coupon, or resource plan before they expire. For more information, see View your usage and validity period.
Procedure
This guide shows you how to generate an image using the text-to-image feature of Stable Diffusion (Shared Edition) and then use that image to create another one.
Step 1: Generate an image from text
Log in to PAI ArtLab. In the upper-right corner, hover over the
icon and select the China (Shanghai) region.On the Toolbox page, click the Stable Diffusion (Shared Edition) card to launch the tool.
For Stable Diffusion Model, select the target checkpoint model.
On the text-to-image > Generation tab, configure the following parameters.
Parameter
Description
Prompt area
Positive prompt (Summer):
Green, Spring, Bamboo Forest, River:1.2, Flowing Water, Nature, Poetic Atmosphere, Green Theme, jade, light green, Masterpiece:1.2, Best Picture Quality, High Definition, Original, Extremely Good Wallpaper, Perfect Light, Extremely Good CG:1.2, Best Picture Quality, Magical Light Effect, super rich, super detailed, 32k, Abstract, 3D<lora:shuimo:0.5> <lora:green:0.1> <lora:guofeng:0.8>Negative prompt:
lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry
Steps
Set to 30.
Sampler
Select DPM++2M Karras.
Width
Set to 512.
Height
Set to 768.
Seed
Select one of the following values:
-1, 994414790, 2897581471, 4112712676, or 460787179.
On the text-to-image > Generation > ControlNet > ControlNet Unit 0 tab, configure the following parameters.
Parameter
Description
Single image
Upload the example image and select Enable, Pixel Perfect, and Allow Preview.
Control type
Select Lineart.
Preprocessor
Select lineart_coarse.
Models
Select control_v11p_sd15_lineart[3ead383e].
Control weight
Set to 0.8.
Click
to preview the image preprocessing effect.
Click Generate.
You can use different combinations of prompts and models to generate images in various styles without changing other parameters.
Step 2: Generate an image from an image
You can send the result from the text-to-image tab to the image-to-image tab in one of the following two ways. The image retains all original generation parameters when sent.
Method 1: On the text-to-image tab, set Batch Count to 4 and click Generate. From the results, select the image you prefer and click the
icon to send it to the image-to-image tab.
Method 2: On the PNG Info tab, upload the generated image and click Send To Img2img.

On the image-to-image > Generation > ControlNet > ControlNet Unit 0 tab, configure the following parameters.
Parameter
Description
Single image
Upload the generated image and select Enable, Pixel Perfect, Allow Preview, and Upload independent control image.
Control type
Select Tile.
Keep the default settings for Preprocessor and Models.
Control weight
Set to 0.8.
On the image-to-image > Generation tab, in the Script section, select Ultimate SD upscale and configure the following parameters.
Parameter
Description
Script
Select Ultimate SD upscale.
Target size type
Select Scale from image size.
Upscaler
Select 4x-UltraSharp.
Click Generate.
Related operations
Install Stable Diffusion WebUI plugins
Only the Exclusive Edition of Stable Diffusion WebUI supports plugin installation. For more information, see Upload local model plugins to the PAI ArtLab platform.
Add models from the Model Gallery
For more information, see Use models from the Model Gallery.
Appendix: PAI ArtLab vs. open-source WebUI
PAI ArtLab's Stable Diffusion is based on Elastic Algorithm Service (EAS) and allows you to quickly deploy and use the open-source Stable Diffusion project in the cloud.
The PAI team has customized the open-source project to meet the needs of cloud deployment and enterprise users. Unlike the open-source version designed for single-PC deployment, the PAI solution is tailored for cloud services and enterprise requirements while ensuring compatibility. The solution provides the following features:
Agile deployment
After you create an Alibaba Cloud account, you can complete the deployment in under five minutes to obtain a WebUI access link, delivering an experience comparable to a local deployment.
It includes pre-installed common plugins and accelerated downloads for popular open-source models.
It provides a wide range of cloud-based GPU resources, including A10, GU60, and GU100 specifications, with video memory options such as 24 GB, 48 GB, 80 GB, and 96 GB to handle tasks of varying complexity.
Enterprise-grade features
It features a decoupled front-end and back-end architecture and supports multi-user, multi-GPU cluster scheduling. For example, 10 users can share 3 GPUs.
It supports authentication for Alibaba Cloud RAM users to ensure model and output isolation while sharing access portals and GPU resources.
The billing system supports cost allocation at the studio and cluster levels for easier financial management.
Deep optimization and plugin ecosystem
It integrates PAI-blade to significantly accelerate image generation, making it 2 to 3 times faster than the original version and 20% to 60% faster than xformer-based optimization, with no impact on image quality.
It provides the filebrowser plugin to facilitate the transfer of models and images in the cloud.
It provides a self-developed modelzoo plugin that accelerates open-source model downloads and enables prompt, image result, and parameter management on a per-model basis.
For enterprise users, it supports centralized plugin management and personalized user configurations.