Deploy ComfyUI on Alibaba Cloud Function Compute in Three Simple Steps
This guide walks you through deploying the open‑source AI image‑generation tool ComfyUI on Alibaba Cloud Function Compute, covering prerequisite services, step‑by‑step configuration of the app and NAS storage, workflow execution, custom node installation, and cleanup to avoid unexpected charges.
Overview
ComfyUI is a popular open‑source AI image‑generation workflow engine. Deploying it on Alibaba Cloud Function Compute (FC) provides a serverless, scalable environment that can generate high‑quality images with built‑in models, plugins, and optional LoRA weights.
Prerequisites
Function Compute (FC) service
File Storage NAS
Both services must be enabled in the Alibaba Cloud console before starting.
Step‑by‑Step Deployment
Open the Function Compute console and ensure you are using the 3.0 version (click “Experience Function Compute 3.0” if needed).
In the left navigation, select Application and click Create Application (skip if you already have an app).
Choose Artificial Intelligence → Workflow AI Image Generation → ComfyUI and click Create . If you cannot find this option, switch to the 3.0 console.
On the creation page, select a region (East China 1 or East China 2) and set the built‑in model to Freeze Everything . Keep other defaults and click Create Application .
In the deployment dialog, enable the two chargeable items: Function Compute FC and File Storage NAS . Agree to the terms and click Agree and Deploy .
Wait about one minute for the deployment to succeed. The console will show a generated domain name; click it to open the ComfyUI UI.
Important Usage Notes
Domain security: Do not share the generated *.devsapp.net domain publicly to avoid extra fees. The domain is for learning/testing only and will be reclaimed after 30 days.
Resource consumption: The UI maintains a WebSocket connection, which incurs compute costs while the page is open. Close the page when not in use; the environment will auto‑close after 10 minutes of inactivity.
Running Your First Workflow
Click Queue Prompt in the UI. The first image may take ~2 minutes (cold start); subsequent images usually finish in 2‑5 seconds.
If the page appears unresponsive, reload after ~10 seconds.
Advanced Configuration
To persist changes, mount a NAS file system:
In the Application details, go to Configuration → Network and enable VPC access, selecting the VPC and switch where your NAS resides.
Under Configuration → Storage → NAS File System , enable the mount, choose your NAS instance, set the remote directory to /fc-stable-diffusion-plus, and set the local directory to /mnt/auto/comfyui. Click Deploy .
After mounting, you can access the NAS file browser to upload/download files.
Installing Custom Nodes
Use the built‑in ComfyUI‑Manager:
Open the Manager panel in the UI.
Click Install Custom Nodes , search for AIGODLIKE-COMFYUI-TRANSLATION, and click Install .
Do not close the page during installation. The process may contact GitHub or HuggingFace; network issues may require a proxy or alternative mirrors.
Accelerating Python Dependencies
Create a pip.conf file in the function’s root directory to use Alibaba Cloud’s PyPI mirror:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = https://mirrors.aliyun.comHandling Missing Nodes and ControlNet
If a workflow references a node that is not installed, use the Manager to add the missing node. For ControlNet usage, import the provided JSON workflow and ensure the required model files are available.
Cleanup After Experiment
To avoid ongoing charges, delete the deployed Function Compute application and the associated NAS file system:
In the Function Compute console, locate the ComfyUI app, click Delete and confirm.
In the NAS console, delete the file system and its mount points.
Optionally, delete related VPC, switch, and security group resources.
If you wish to keep resources, choose the “Pay to retain resources” option before ending the lab.
Common Q&A
Queue Prompt does nothing: The first request may trigger a cold start lasting 3‑5 minutes. Monitor the green progress border or view the queue.
Stop a queued job: Use View Queue → Clear Queue then refresh.
Workflow errors after editing: Reload the original JSON file to restore the default configuration.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
