Nodes/ComfyUI-YogurtNodes/Wan Generate/Edit Image
ComfyUI Node

Wan Generate/Edit Image

The only way to touch 'Wan' image generation without renting a data center

By yogurt7771·Created 2 years ago·Updated 9 days ago· 1
Wan Generate/Edit Image
  • image
  • image1
  • image2
  • image3
  • image4
  • history
  • image
  • images
  • num_images
  • text
  • history
api_key
base_url
model_namewan2.7-image
system_prompt
prompt
sizeauto
n1
negative_prompt
watermarkfalse
retry_count1
proxy_url
seed-1
timeout0
extra{}

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 pipeline
  • images - the full batch, when you request more than one
  • num_images - how many came back
  • text - the model's accompanying text
  • history - 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 the wan/dashscope config or the DASHSCOPE_API_KEY environment variable, per the tooltip.
  • model_name - defaults to wan2.7-image.
  • prompt (multiline) - the generation or edit instruction. system_prompt gets prepended locally.
  • size - output resolution: auto, 2K, 1K, or an explicit 1536*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.

CategoryYogurtNodes/LLM

Inputs (20)

NameTypeDefaultDescription
api_keySTRING百炼 API Key,留空时尝试读取 wan / dashscope 配置或 DASHSCOPE_API_KEY
base_urlSTRINGDashScope API 根地址,留空时默认使用北京地域
model_nameSTRINGwan2.7-imageWan 图片模型名称,首版按统一 generation+editing 协议接入
system_promptSTRING本地拼接到主提示词前的系统提示词,接口仍以单轮 user 消息发送
promptSTRING图片生成或编辑提示词
sizeSTRINGauto输出分辨率,例如 2K、1K 或 1536*1024;auto 表示交给模型决定
nINT11–12输出图片数量,实际可用上限取决于模型和模式
negative_promptSTRING反向提示词
watermarkBOOLEANfalse是否添加 AI 生成水印
retry_countINT1请求失败时的重试次数
proxy_urlSTRING代理 URL,格式: protocol://user:pass@addr:port
seedINT-1-1–2147483647随机种子,-1 表示让服务端自动生成
timeoutINT00–2147483647请求超时时间(秒),0 表示不限制
imageoptIMAGE
image1optIMAGE
image2optIMAGE
image3optIMAGE
image4optIMAGE
historyoptHISTORY
extraoptSTRING{}额外请求参数,支持补充 bbox_list、enable_sequential、thinking_mode 等高级字段

Outputs (5)

NameTypeDescription
imageIMAGE
imagesIMAGE
num_imagesINT
textSTRING
historyHISTORY