Cloud Native 11 min read

Deploy ComfyUI on Alibaba Cloud Function Compute for Low‑Cost AI Image Generation

This guide explains how to quickly deploy the node‑based AI image generation tool ComfyUI on Alibaba Cloud Function Compute, covering prerequisites, step‑by‑step configuration, NAS integration, workflow loading, performance tips, and resource cleanup to achieve efficient, serverless AI drawing.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
Deploy ComfyUI on Alibaba Cloud Function Compute for Low‑Cost AI Image Generation

Background

ComfyUI is a node‑based UI for Stable Diffusion that enables highly customizable image‑generation workflows. It is used for e‑commerce posters, anime‑to‑real conversion, photo restoration, portrait customization, stylized filters, and video generation, but requires a powerful GPU for local deployment.

Why Deploy on Alibaba Cloud Function Compute (FC)

Deploying ComfyUI on FC provides scalable GPU resources, reduces hardware costs, and simplifies setup through a serverless, pay‑as‑you‑go model.

One‑Click Deployment Procedure

Open the Function Compute console and go to the Application Center (FC 3.0).

Create a new application under the Artificial Intelligence category, selecting the template “Workflow AI Image Generation – ComfyUI”.

Select a region (Hangzhou or Shanghai) and keep the default options.

Confirm and deploy ; the environment is provisioned in about one minute.

After deployment, click the provided WebUI domain to access ComfyUI. Keep the domain private to avoid unexpected charges.

Initial Workflow Test

Open the WebUI, wait up to 10 seconds if the page initially fails to load, then click Queue Prompt . The first image generation may take ~30 seconds due to a cold start; subsequent generations typically finish in 2‑5 seconds.

Loading the “Clay Filter” Workflow

Download the preset clay workflow.zip from

https://labfileapp.oss-cn-hangzhou.aliyuncs.com/函数计算/基于函数计算部署ComfyUI绘图平台/clay%20workflow.zip

and unzip.

In ComfyUI, click Load and import the JSON file.

Upload the source image via Load Image → Choose File .

Press Queue Prompt to generate the stylized output. Portrait images give the best results.

NAS Integration for Model Persistence

Mount a File Storage NAS to persist models and workflow files. Set the local directory to /mnt/auto or /mnt/auto/comfyui. Use a high‑performance NAS instance for large model I/O.

Installing Custom Nodes

Use the ComfyUI‑Manager to install additional nodes, e.g., the Chinese translation plugin AIGODLIKE-COMFYUI-TRANSLATION. Search for the node name, click Install , then Restart and refresh the page.

Accelerating Python Dependency Installation

Edit /mnt/auto/comfyui/root/.pip/pip.conf to use Alibaba Cloud’s PyPI mirror:

[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = https://mirrors.aliyun.com

Handling Missing Nodes

If a workflow references unavailable nodes, install them via the manager or refer to the ComfyUI Guides (https://comfyui-guides.runcomfy.com/) for troubleshooting.

ControlNet Example

The guide includes a ControlNet workflow JSON and model download instructions to demonstrate the visual difference between using ControlNet and direct generation.

Resource Cleanup

When ComfyUI is no longer needed, delete the Function Compute application (no further charges) and detach or delete the NAS file system (storage fees persist while data remains).

References

Function Compute console: https://account.aliyun.com/login/login.htm?oauth_callback=https%3A%2F%2Ffcnext.console.aliyun.com%2Foverview

ComfyUI‑Translation plugin repository: https://github.com/AIGODLIKE/AIGODLIKE-COMFYUI-TRANSLATION

ComfyUI Guides: https://comfyui-guides.runcomfy.com/

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

ServerlessworkflowAI image generationFunction ComputeNASComfyUI
Alibaba Cloud Native
Written by

Alibaba Cloud Native

We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.