Generate Hyper‑Realistic AI Portraits with Flux, PuLID & ComfyUI on Alibaba Cloud Serverless
This guide walks you through deploying the Flux AI model with PuLID on Alibaba Cloud Function Compute, configuring ComfyUI, and using detailed prompts to create ultra‑realistic portrait images, while covering free‑quota acquisition, step‑by‑step setup, and important cost‑saving warnings.
Experiment Preparation
Flux, released by Black Forest Labs, is a high‑resolution text‑to‑image model that excels in prompt adherence, diverse aspect ratios, typography, and varied subjects such as real‑world scenes, characters, and animals. PuLID for Flux enables facial‑feature preservation without training LoRA, making it ideal for stylized portrait generation across art, virtual avatars, film, advertising, and social media.
Deploy Flux Model on Alibaba Cloud Function Compute
Activate Function Compute (FC) and NAS services (free trial links provided).
Open the Function Compute console (ensure you are in version 3.0).
Create the default role AliyunFcDefaultRole via the Role Quick‑Create page and grant the required permissions.
In the left navigation, select Application and click Create Application (skip if you have used the Application Center before).
Choose Artificial Intelligence → Flux Pulid Face‑Swap and click Create .
Confirm the role permissions and that NAS is enabled (NAS stores the required LoRA files for Flux).
Select a nearby region (currently supported: Hangzhou, Shanghai, or Tokyo) and click Create Application .
Wait about one minute until the deployment status shows Success , then click the generated domain to start using the Flux model.
Important: Protect the generated *.devsapp.net domain to avoid unexpected charges. The domain is provided for learning and testing only; it may be reclaimed after 30 days. For production use, bind a custom domain.
Run ComfyUI with Flux + PuLID
Download the prepared .json workflow from the provided OSS link.
In ComfyUI, click Load and import the workflow file.
Upload a source image in the Upload Image node.
Click Queue Prompt to generate the output using the default prompt.
The first image incurs a cold‑start delay of roughly five minutes; subsequent images render in 2–5 seconds.
Modify the prompt to explore different styles.
Example prompts for female portraits include detailed descriptions of a young woman surrounded by AI‑related hardware, while male prompts describe a focused programmer with cyber‑punk elements. You can also generate custom prompts using Alibaba’s Tongyi large‑language model.
Free Quotas and Resources
FC free trial:
https://common-buy.aliyun.com/package?planCode=package_fcfreecu_cnNAS free trial: https://free.aliyun.com/?productCode=nas After completing the three‑step experience, the first 30 daily participants receive a complimentary laptop bag; additional prizes include power banks and canvas bags.
Warnings
ComfyUI maintains a persistent WebSocket connection, incurring compute costs while the page is open. Close the page when not in use; idle sessions automatically shut down after ten minutes to save expenses.
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.
