Haoran 万相提示词助手
A prompt template cheat-sheet that hands text to the Wanx edit node
- 提示词
HaoranWanxPromptHelper is the pack's training wheels. It's a text factory: pick an edit function, pick a template, and it emits a ready-made prompt string you wire into the 提示词 input of the Haoran 通义万相图像编辑 node. Nothing goes to the network, no key involved - it's pure string generation, the "what do I even type here" problem solved in advance.
That's genuinely useful, because the wanx2.1-imageedit API is picky about phrasing. The README spends real space on it: global stylization wants "转换成xx风格" ("convert to X style"), local stylization wants "把xx变成xx风格" ("turn X into Y style"), and inpainting wants you to describe what should appear rather than say "delete." The helper bakes exactly those phrasings in, which is a nice crutch when you're starting and a decent reminder of the house style once you're not.
How it works
Three inputs, all required on the graph but effectively optional in practice:
- 功能 - an enum of 9 functions (everything the main node offers except 局部重绘, the mask one, since that function doesn't prompt the same way). Each function has its own set of templates behind it.
- 模板 - a free-text field naming which template you want (e.g. 添加配饰 for instruction editing, 冰雕 for local stylization).
- 自定义内容 - a multiline field. Here's the subtle bit: if you type anything into it, it wins outright - the helper returns your text verbatim and ignores the template entirely. That's the escape hatch for when no canned phrase fits.
If 自定义内容 is empty, the helper looks up the named 模板; if that doesn't match, it falls back to the first template for the function. Output is a single 提示词 (STRING), ready to plug into the edit node.
The gotcha nobody tells you
The templates contain literal {对象}-style placeholders - "给{对象}添加{配饰}" - and the helper does not fill them in. You get the raw template string back, braces and all, and you're expected to either edit it or put your filled-in version in 自定义内容. So the two paths are: pick 模板 and hand-edit the output, or skip 模板 and write the finished sentence in 自定义内容. Newer users burn a solid minute wondering why the API got a prompt with curly brackets in it; now you won't. (The API won't explode on it either - it'll just do something vaguely literal with whatever text lands in the prompt field.)
One more honest note: since the helper just emits text, it's not doing anything a text box and a cheat-sheet couldn't. Its value is organizational - you can park a bunch of prompts on the canvas and flip between them without retyping, and it keeps the pack's documented phrasing one click away. If you already know what to type, you can skip it entirely and feed the edit node directly.
Install
Same pack as everything else, so same story: ComfyUI Manager, search "ComfyUI-HaoranWanxImageEdit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/GonDesign/ComfyUI-HaoranWanxImageEdit
cd ComfyUI-HaoranWanxImageEdit
pip install -r requirements.txt
Restart and it's under the 昊然 category. Requirements are just requests, Pillow, and numpy - nothing that'll fight your environment. It's the smallest node in the pack, but it's also the one with the least to go wrong: no network, no key, no state. The only failure mode is a prompt you wrote, and that's on you.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| 功能 | COMBO | 指令编辑 | 9 options: 全局风格化, 局部风格化, 指令编辑, 去文字水印, 扩图, 图像超分, +3 |
| 模板 | STRING | — | |
| 自定义内容 | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 提示词 | STRING | — |