Wan Generate/Edit Image
The only way to touch 'Wan' image generation without renting a data center
- image
- image1
- image2
- image3
- image4
- history
- image
- images
- num_images
- text
- history
If "Wan" makes you think of the open-source video model, this node will surprise you - and that's the point. Since Wan 2.5, Alibaba stopped releasing open weights entirely: 2.5, 2.6, and 2.7 are all API-only, served through their Bailian (百炼 / DashScope) cloud platform. YogurtWanGenerateImage is the pack's front door to that API. It calls Alibaba's wan2.7-image model for text-to-image or image editing and returns the result as a torch tensor inside your ComfyUI graph. No VRAM, no checkpoints, no weights to download - just a cloud account and a prompt.
How it works
The node hits the DashScope API (Alibaba Cloud's model service) with your prompt and returns the image. Outputs:
image- the result as an IMAGE tensor, wired straight into the rest of your local pipelineimages- the full batch, when you request more than onenum_images- how many came backtext- the model's accompanying texthistory- for chained requests
The optional image through image4 inputs flip it into editing mode - the model's "unified generation + editing protocol," as the tooltip puts it. Feed in a reference image, describe the edit, get an edited image back. That's the pattern this node exists for: cloud editing power inside a local graph, same as the pack's Gemini image node but with Alibaba's models.
The inputs that matter
api_key- your Bailian/DashScope key. Leave it empty and the node tries thewan/dashscopeconfig or theDASHSCOPE_API_KEYenvironment variable, per the tooltip.model_name- defaults towan2.7-image.prompt(multiline) - the generation or edit instruction.system_promptgets prepended locally.size- output resolution:auto,2K,1K, or an explicit1536*1024.n(default 1, max 12) - how many images to generate per request.negative_prompt- the anti-list. Worth filling for image gen.watermark(default false) - whether to add an AI-generation watermark.seed(default -1) - let the server pick, or set one for reproducibility.
The extra field is where the advanced options hide - the tooltip mentions bbox_list, enable_sequential, and thinking_mode as supported extras. You can mostly ignore it until you need those.
The honest expectations
Set your expectations by what this actually is. Alibaba's hosted Wan image API is a black box with a billing meter: every call costs money, you need a Bailian account with quota, and Alibaba's content filtering applies server-side. This is not the uncensored open-weights Wan experience - the open Wan 2.1/2.2 weights are a local video model, not this, and this hosted image model lives under Chinese cloud content rules. You're paying for convenience and for a model you can't download. The community's reception of the Wan 2.7 line has been lukewarm at best, so if your goal is simply "good hosted image generation," the pack's Gemini nodes may serve you better; reach for this one when you specifically want Wan's output character or want to compare it against Gemini in the same workflow.
Installing and setting up
Install the pack via ComfyUI Manager (search "ComfyUI-YogurtNodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes.git
cd ComfyUI-YogurtNodes
pip install -r requirements.txt
Restart, and you'll find it under YogurtNodes/LLM. Then create a Bailian/DashScope account, get an API key, and either paste it into api_key or set DASHSCOPE_API_KEY.
Common issues
Auth and region are the usual suspects. A key that works for one DashScope service may not be enabled for image generation - check the model is available to your account and region in the Bailian console. Empty api_key plus no env var, and the node has nothing to authenticate with. If you're outside mainland China, base_url matters: leaving it empty defaults to the Beijing (mainland) endpoint, which can be slow or blocked from some networks - set it to the international/other-region DashScope endpoint if you have access to one. And watch the watermark toggle; if you're getting marked images you didn't ask for, it's on.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | 百炼 API Key,留空时尝试读取 wan / dashscope 配置或 DASHSCOPE_API_KEY | |
| base_url | STRING | DashScope API 根地址,留空时默认使用北京地域 | |
| model_name | STRING | wan2.7-image | Wan 图片模型名称,首版按统一 generation+editing 协议接入 |
| system_prompt | STRING | 本地拼接到主提示词前的系统提示词,接口仍以单轮 user 消息发送 | |
| prompt | STRING | 图片生成或编辑提示词 | |
| size | STRING | auto | 输出分辨率,例如 2K、1K 或 1536*1024;auto 表示交给模型决定 |
| n | INT | 11–12 | 输出图片数量,实际可用上限取决于模型和模式 |
| negative_prompt | STRING | 反向提示词 | |
| watermark | BOOLEAN | false | 是否添加 AI 生成水印 |
| retry_count | INT | 1 | 请求失败时的重试次数 |
| proxy_url | STRING | 代理 URL,格式: protocol://user:pass@addr:port | |
| seed | INT | -1-1–2147483647 | 随机种子,-1 表示让服务端自动生成 |
| timeout | INT | 00–2147483647 | 请求超时时间(秒),0 表示不限制 |
| imageopt | IMAGE | — | |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| historyopt | HISTORY | — | |
| extraopt | STRING | {} | 额外请求参数,支持补充 bbox_list、enable_sequential、thinking_mode 等高级字段 |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| images | IMAGE | — |
| num_images | INT | — |
| text | STRING | — |
| history | HISTORY | — |