LLM Prompt
One mode needs no model at all
- image
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- 提示词
- report
The display name is just "LLM Prompt", which undersells it. It's not a chat node, and it's not MOSS-only despite living in a MOSS pack - it's a small prompt workshop with five jobs, one of which doesn't load a model at all. Start with that one, before you spend an evening on a GGUF download.
What it actually does
Five tasks, and they split cleanly into two groups.
The model-free one is 拼装 (assemble). Paste a structured JSON draft, pick a target, get that backend's dialect back. Deterministic Python - no sampling, no seed effects, same draft in, same prompt out, forever.
The other four talk to a language model. 反推 (reverse) reads an image and writes the prompt that would produce it. 洗图 (wash) is reverse-prompting with a structured inventory pass first - the high-fidelity variant. 扩写 (expand) turns a one-line idea into a full scene description. 编辑 (edit) turns an instruction into an img2img edit prompt. Those run through a llama-server sidecar: start the process, do the work, release the VRAM. That matters more than the feature list - you're budgeting two models on one card, and a node that holds both resident OOMs mid-batch.
Or point api_base at any OpenAI-compatible endpoint - LM Studio, Ollama, something remote - and model stops mattering. report says which channel you used, which is how you catch yourself debugging the wrong machine.
The inputs you'll actually touch
Most of the widgets are set-and-forget. The ones that change your result:
task, text and model are the core. text means something different per task: your idea when expanding, what to preserve when reverse-prompting, your JSON draft when assembling.
target decides which dialect you're writing for: moss-image by default, plus sdxl, flux1_dev, qwen-image-2_1, krea2, flux3, nano-banana and minimax-h3. It's also where silent screwups live. sdxl and flux1_dev get tag-style output because that's what those encoders were trained on. Point a storyboard-grid style at a model that only reads captions and you won't get an error - you'll get a beautifully formatted prompt it ignores. The code catches that and rewrites the dialect, saying so in report rather than editing your saved workflow.
temperature defaults to 0.2, and that's correct. Low for photorealism and "reproduce this exact image"; 0.5 when you want options; 0.9+ only for brainstorming, where the model inventing props you never asked for is the deal you knowingly made.
Then the small useful ones: keep (semicolon-separated things that must survive verbatim - a product name, a hex code, a hair colour), style_class + style + style_note for locking a look without touching structure, length for token budget, panels for grid scripts.
Two more worth knowing: api_key is wiped every time you save the workflow, so a shared graph carries no secret (MOSS_LLM_API_KEY in the host environment is the workaround). And speed - the local-VRAM preset - is the knob to reach for before you go shopping for a smaller model.
Outputs are two strings: 提示词, which goes to a CLIPTextEncode or a sampler's positive, and report, where the node explains itself. Read it - it names the channel and anything it had to downgrade.
Install
Manager, search MOSS Storyboard, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/ZenHG/ComfyUI-MOSS-Storyboard
Core deps are zero and requirements.txt is deliberately comments-only. The LLM half is where things get real:
- Model-free check: drag
examples/llm-compile-zero-model.json, press Run. If it produces a prompt, the node works and you haven't downloaded a byte. - Local models: GGUFs go in
models/LLM/ormodels/text_encoders/(both scanned recursively). Caption and edit tasks need a vision model plus itsmmprojin the same folder; expand needs text only. - The llama-server binary: press Install / update in the node's Local engine group; it lands in the pack's
moss_llm/runtime/(CPU build ~35 MB, CUDA builds into the hundreds).MOSS_LLM_RUNTIME_DIRrelocates it,MOSS_LLM_MIRRORhelps if the download crawls. - Already have a binary? Point
MOSS_LLM_SERVERat it, and use the Test button next to Install - it runs--versiononly, so you find out the binary works before you load a 9B.
When it complains
找不到 llama-server 可执行文件 at startup is harmless if you only wanted the storyboard nodes. If the context or max_tokens is too small for the images you connected, it fails before loading weights and names the value to change - the right order of operations, and rarer than it should be. Multi-image input is downscaled to fit the budget, and up to nine images are supported (a new slot appears when you connect the last one).
Inputs (27)
| Name | Type | Default | Description |
|---|---|---|---|
| task | COMBO | 反推 | 反推=看图写提示词(接图);洗图=反推+先结构化盘点再写(洗图/高保真);扩写=想法→完整画面描述(填文字);拼装=结构化草稿→成品提示词(不开模型) |
| model | COMBO | (未找到 GGUF 模型) | 本机 GGUF 权重。用在线服务时这里可以不管,填下面的「API地址」即可 |
| text | STRING | 扩写=你的想法;洗图/反推=要保留什么;拼装=粘贴 JSON 草稿 | |
| style_class | COMBO | 连贯描述 | 先选一类:连贯描述 / 风格 / 标签串 / 分段结构 |
| style | COMBO | 英文详述 | 具体写法。「风格」类会注入风格锁定,不改变结构 |
| target | COMBO | moss-image | 输出给哪个模型。拼装时决定编译目标;扩写时一般不用动(填了就以它为准,选「时间线六段式」会自动切成 minimax-h3) |
| style_note | STRING | 选「自定义」风格时在这里写:光线/色调/质感/参考方向,一句话即可;留空则等同「英文详述」。平时不用管它 | |
| length | COMBO | 中 | 短≈512 / 中≈1024 / 长≈2048 tokens |
| temperature | FLOAT | 0.200–2 | 越低越稳、越高越发散。三档够用:0.1–0.3 稳定(默认 0.2,同一输入基本重写同一段);0.5 左右平衡;0.9 以上发散(措辞变化大,也更容易跑偏)。写实/产品/复刻用低档,创意/氛围用高档 |
| panels | INT | 41–9 | 仅「宫格稿」写法:分几格 |
| language | COMBO | auto | 输出语言。auto=跟随写法 |
| keep | STRING | 必须保留的字/数/色/风格,分号分隔。会逐字出现在提示词里 | |
| seed | INT | 00–18446744073709550000 | 复现用。0=每次不同 |
| api_base | STRING | 填了就走在线服务,留空走本机模型 | |
| api_model | STRING | 在线模型名。直接手填服务商给的 id 就能用;点 ↻ 拉一次清单后,也可在这格右边的下拉里选 | |
| api_key | STRING | 在线服务的密钥。保存工作流时自动清空 | |
| speed | COMBO | 均衡 | 本机跑的显存档:省显存 / 均衡 / 尽量快 |
| runtime | COMBO | auto | 本机程序从哪来。自动=先找环境变量/本包/系统环境,找不到就报错;自动下载=找不到时联网装一个(CPU 约 35MB,CUDA 数百 MB,按显卡自动选后端;国内可设 MOSS_LLM_MIRROR) |
| imageopt | IMAGE | 接一张参考图。反推/洗图必须接;扩写接了会当参考。最多 9 张,顺序对应「参考图 2…9」 | |
| image2opt | IMAGE | 第 2 张参考图。不用就空着 | |
| image3opt | IMAGE | 第 3 张参考图。不用就空着 | |
| image4opt | IMAGE | 第 4 张参考图。不用就空着 | |
| image5opt | IMAGE | 第 5 张参考图。不用就空着 | |
| image6opt | IMAGE | 第 6 张参考图。不用就空着 | |
| image7opt | IMAGE | 第 7 张参考图。不用就空着 | |
| image8opt | IMAGE | 第 8 张参考图。不用就空着 | |
| image9opt | IMAGE | 第 9 张参考图。不用就空着 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| 提示词 | STRING | — |
| report | STRING | — |