You need to enable JavaScript to run this app.
Volcano Engine Function as a Service

Volcano Engine Function as a Service

Copy page
Download PDF
Image generation
Deploying AI painting Stable Diffusion applications with a few clicks
Copy page
Download PDF
Deploying AI painting Stable Diffusion applications with a few clicks
This topic describes how to deploy an AI painting Stable Diffusion application with a few clicks by using the Application Center of veFaaS.​
tip​
[Beta - apply for trial] This application requires GPU computing power support. Serverless GPU is currently in beta. Contact your account manager to apply for a trial.​
Background information​
  • Application introduction​
  • This application provides the Serverless deployment capability of the stable-diffusion-webui project. After deployment, you can use the Stable Diffusion WebUI through the domain name provided by API Gateway Trigger, including text-to-image, image-to-image, and advanced features such as Lora and ControlNet.​
  • Runtime​
  • Native runtime​
  • Associated cloud services​
  • veFaaS: Performs GPU inference computation on AIGC.​
  • APIG: Sends requests for AIGC image generation.​
Prerequisites​
  • All the cloud services associated with the application have been activated.​
  • The VeFaaSFullAccess, APIGFullAccess, and STSAssumeRoleAccess policies have been attached to Identity and Access Management (IAM) users. If one of the preceding policies is not attached, contact the root user or the administrator for authorization. For specific operations, refer to Creating user and authorize.​
  • An APIG instance has been created in APIG. For detailed operations, see Creating instances.​
  • If you use veFaaS for the first time, make sure that the cross-service authorization is complete. If the authorization is not complete, the cross-service authorization page will appear, which provides guidance on authorization.​
Procedure​
  1. Log in to the veFaaS console.​
  1. In the top navigation bar, select the target region.​
  1. In the left navigation bar, click App.​
  1. On the My app page, click Create app.​
  1. On the Create app page, find the volcano-stable-diffusion template and click Create.​
  1. On the Create App page, specify the following information as required.​
  • Basic information​
  • ​
    Parameter​
    Description​
    Selected template​
    Displays the selected template. In this scenario, the template is volcano-stable-diffusion.​
    Name​
    Specify a custom name for the application.​
    Description​
    Enter the description of the application. This parameter can be left empty.​
    IAM role​
    The Application Center provides the system default role ServerlessApplicationRole, which is granted permissions on some cloud resources that the Application Center needs to access.​
    • If your user roles do not contain this role, this role will be automatically added.​
    • If your user roles contain this role, the system will automatically detect whether all the policies required for the application are attached to this role. If a required policy is not attached, the console will display the name of the policy. You can click Add policy to add the policy.​
    warning​
    • Make sure that the IAMReadOnlyAccess policy is attached to IAM users. Otherwise, they will not be authorized to obtain information about the ServerlessApplicationRole role.​
    • If IAM users need to attach policies to the ServerlessApplicationRole role, make sure that the IAMFullAccess policy is attached to the IAM users.​
    Associated cloud services​
    Displays the names, activation status, and activation purposes of all the cloud services that the current application needs to use.​
    ​
  • Advanced settings​
  • ​
    Parameter​
    Description​
    Region​
    The region where the application and its associated cloud resources are located.​
    Function name​
    Specify a custom name for the function.​
    API Gateway instance​
    Select the target API Gateway instance. The resources related to the API Gateway trigger, including services, Upstream, and routes, will be automatically created for this API Gateway instance.​
    ​
  1. Click Confirm to create and deploy the application.​
  • You will be automatically redirected to the application details page, which displays the application deployment logs in real time.​
Result validation​
  1. After the application is deployed, click the access address under API Gateway in the cloud resources list to open the Stable Diffusion WebUI page.​
  1. In the text box on the txt2img tab, enter the prompt and click Generate to generate an image that matches the prompt.​
​
Last updated: 2026.08.19 14:06:07