This guide shows you how to deploy a ComfyUI image generation project and generate your first image in under 10 minutes. You will learn how to create a project, debug workflows in a workspace, and publish an online service for elastic image generation.
Overview
ComfyUI is an open source, node-based graphical interface for Stable Diffusion. It lets you precisely and flexibly control AI image generation by connecting functional modules in a flowchart-style interface. FunArt supports one-click deployment of ComfyUI image generation projects. It provides full lifecycle management—from project development to API calls.
Two usage phases:
Project development phase: Debug prompts and workflows. Install models and plug-ins. Generate images or videos that match your expectations.
API call phase: Run workflows in your tested environment using a Serverless API for elastic and efficient image generation.
Prerequisites
Before you begin, ensure the following conditions are met:
RAM authorization: A Resource Access Management (RAM) user has permission to use image generation projects. For more information, see Authorize a RAM user to use image generation projects.
Account balance: Your account balance must be at least CNY 100. New customers should claim the trial quota to reduce costs.
Deploy a ComfyUI project with one click
Step 1: Create a project
Log on to the FunArt console.
In the navigation bar, click Projects. Then choose .
Step 2: Configure the project
On the Create Project page, configure the following parameters:
Parameter | Description | Example |
Project type | Select ComfyUI project | ComfyUI project |
GPU type | Select a GPU type and specification | T4 / A10 |
Region | Select the region where you want to deploy the project | China East 1 (Hangzhou) |
Keep all other parameters at their default values. Then click Confirm deployment.
Note:
GPU fees are calculated using Serverless billing. The estimated cost shown in the console is for reference only. The actual charges are based on your usage.
If your users are concentrated in one geographic region, deploy the project in that region. If GPU resources in your current region do not meet your needs, try another region.
Step 3: Confirm deployment
On the confirmation page, review the billing details and resource usage for the products involved. Then click Confirm deployment.
Deployment result:
Deployment starts. The console shows Preparing project (3–5 minutes). No GPU fees apply during this phase.
After the deployment is complete, the workspace starts automatically. You enter the project development phase.
Starting the workspace launches a GPU instance. You can download models, install plug-ins, and generate images or videos by debugging prompts and workflows.
When you finish, close the workspace promptly. Closing the workspace destroys the function instance and stops billing. You must restart the workspace before using it again.
Generate images using the workspace
Step 1: Set a prompt and generate an image
In the ComfyUI project workspace, set a prompt.
Click the Run button to generate the image.
The generated image is saved in the output/ folder. Go to the File Management tab and locate the image in that folder.
Step 2: Upload plug-ins and models
Upload plug-ins:
You have two options:
Option 1 (recommended): In the ComfyUI workspace, click . Then click Install in the row for your target plug-in.
Option 2: On the File Management tab in the ComfyUI interface, upload your target plug-in to the
custom_nodes/folder.
Upload models:
On the File Management tab in the ComfyUI interface, upload your target model to the models/ folder.
After uploading custom plug-ins and models and refining your workflow to produce better images, publish an online service.
Publish an online service
Publishing an online service turns your tested workspace—including ComfyUI source code, plug-ins, and dependency packages—into a Serverless API. This supports elastic image generation.
Step 1: Publish the online service
In the project development page, click Publish online service in the upper-right corner.
In the Publish online service dialog box, complete the following steps:
Step 1: Select a GPU type and specification. Set the elastic mode. By default, Elastic instance is selected.
Step 2: Configure the elastic policy. Set the minimum number of instances (the default is 1). The console displays detailed billing information. When no requests or background tasks are running, the system enters idle billing mode. You are not charged for CPU usage. GPU fees are 10% to 20% of the full rate, depending on the GPU type.
After configuration, click Confirm.
Important:
By default, publishing an online service enables snapshots for the API call phase. Snapshots lock elastic resources in advance to avoid cold starts.
When not generating images: You pay a small snapshot fee.
When generating images: You are billed for elastic instances.
If you do not plan to use the ComfyUI project for an extended period, go to the Online Service page. Then go to the Configuration Management tab and set the number of snapshots to 0.
Step 2: Call the API
After publishing, go to the API Call tab. Use one of the following methods to call the API for elastic image generation:
Method 1: Use cURL
curl -X POST https://your-api-endpoint/invoke \
-H "Content-Type: application/json" \
-d '{
"prompt": "a beautiful landscape",
"workflow": "your-workflow-id"
}'Method 2: Use Postman
Create a new POST request.
Enter the API endpoint URL.
In the Body section, select raw and set the format to JSON.
Enter the request parameters:
{
"prompt": "a beautiful landscape",
"workflow": "your-workflow-id"
}Click Send to submit the request.
Method 3: Use the Python SDK
import requests
# API endpoint
api_endpoint = "https://your-api-endpoint/invoke"
# Request parameters
payload = {
"prompt": "a beautiful landscape",
"workflow": "your-workflow-id"
}
# Send request
response = requests.post(api_endpoint, json=payload)
# Get response
if response.status_code == 200:
result = response.json()
print(f"Generation succeeded. Image URL: {result['image_url']}")
else:
print(f"Request failed: {response.status_code}")Delete a project
If you no longer need a ComfyUI project, delete it to release resources.
Procedure
Click the project name to open the project details page. Then click Delete project.
In the dialog box, review the resources to delete.
By default, Function AI deletes all services under the project.
To keep specific resources, clear the check boxes next to those services. Only the selected services are deleted.
Select I understand: Deleting this project and the selected services will immediately interrupt all online services it supports. This action cannot be undone. All dependent cloud resources will be permanently deleted. Then click Confirm deletion.
What to do next
After completing this quick start, you can:
Learn more ComfyUI workflow configuration techniques.
Learn how to optimize API call performance. For more information, see ComfyUI API calls.
Review best practices for cost optimization.
FAQ
Q1: What do I do if the workspace fails to start?
Possible causes:
Insufficient GPU resources
Insufficient account balance
Solutions:
Check whether your account balance is sufficient.
Try switching to another region or GPU specification.
Contact technical support.
Q2: What do I do if an API call returns an error?
Possible causes:
Incorrect API endpoint configuration
Invalid request parameter format
Workflow ID does not exist
Solutions:
Verify that the API endpoint URL is correct.
Confirm that the request parameter format matches the API specification.
Verify that the workflow ID exists.
Q3: How do I control costs?
Recommendations:
Close the workspace promptly after use.
If you do not plan to use the service for an extended period, set the number of API snapshots to 0.
Select a GPU specification that matches your actual needs.