Updated on 2025-07-10 GMT+08:00

Procedure

Table 1 describes the procedure for deploying the Stable Diffusion application using FunctionGraph. The advanced process is oriented to specific service scenarios.

Table 1 Procedure for deploying the Stable Diffusion application

Step

Description

Deploying and Using the Stable Diffusion Application

You can create an application using the Stable Diffusion template in FunctionGraph Applications page to use the default model and temporary domain names.

(Optional) Binding a Custom Domain Name

To bind a custom domain name to access the application, perform the following operations:

  1. Prepare a custom domain name.
  2. Configure domain name resolution.
  3. Bind the custom domain name.

(Optional) Uploading a Custom Model

To use a custom model, perform the following operations:

  1. Create a VPC and subnet.
  2. Create an SFS Turbo file system.
  3. Initialize the file system mounted to the custom model.
  4. Upload and load a custom model.

(Advanced) Using ECS as an NFS Server to Isolate Resources of Multiple Users

To isolate resources among multiple users, you can mount an ECS as the source of a file system. You can set a shared NFS path to manage resources of multiple users. The operations are as follows:

  1. Buy an ECS.
  2. Configure NFS sharing for an ECS.
  3. Mount an ECS to the Stable Diffusion application function.
  4. Upload and load a model.

(Advanced) Mounting an SFS File System to Multiple Users

To share model resources among multiple users, you can mount the same SFS Turbo file system to each user. In addition, you can set the path for saving the results of individual applications to isolate the inference results. To do so, perform the following operations:

  1. Create a multi-user configuration file.
  2. Modify environment variables and use the new configuration file.
  3. Change the path for saving the result.

(Advanced) Enabling WebUI Authentication

To enhance application security, you can configure function environment variables to enable WebUI authentication. When accessing the WebUI, you need to enter the username and password to perform drawing operations.

(Advanced) Accessing Applications Using APIs

To access applications using APIs, you can enable and configure concurrency parameters by configuring function environment variables.