Guide flexible prompt poses through MCP

This commit is contained in:
DemonGatanjieu
2026-10-30 03:48:12 +08:00
parent 71dca092b6
commit e4f8d45d17
4 changed files with 14 additions and 3 deletions
+3
View File
@@ -2,6 +2,9 @@
## v1.63.0 — unreleased
- AI 写出图提示词时,AMB 的工具说明会建议:姿势可以选时优先选模型容易画清楚的动作,避免不必要的复杂手势;你指定的姿势和提供的文本照你的要求处理。复杂姿势可以用参考姿势或分步修复,并检查结果。
- When an AI composes an image prompt, AMB's tool descriptions suggest a clear pose suited to the model when the pose is flexible. Explicit poses and supplied text are preserved; pose references or staged repair can help with difficult poses.
- 跑图前的尺寸提醒放宽一档:6GB 显卡采样到约 420 万像素才提醒(以前 210 万),12GB 约 840 万。今天在 6GB 的笔记本显卡上实测,400 万像素一次约 100 秒,并不吃紧;以前的门槛会让 AI 动不动就问你要不要停。解码大图的提醒不变。
- The size warning before a run is less eager: on a 6 GB card from about 4.2 megapixels (2.1 before), 8.4 on 12 GB. A 6 GB laptop card sampled 4 megapixels in about 100 s today; the old line had the AI ask you to stop runs that were fine. The warning for decoding a large picture is as before.
+6 -2
View File
@@ -257,6 +257,10 @@ def speak(ctx, character, text, seed=None, language="auto"):
_NODE = {"type": "integer", "description": "A node id."}
_MODEL = {"type": "string", "description": "model_id from search_models."}
_PROMPT = {"type": "string", "description": "When composing a prompt, if the pose is flexible, prefer a clear, "
"natural pose suited to the model; avoid unnecessary interlocked hands or complex contact. Preserve "
"explicit user requests and supplied text. For difficult requested poses, consider pose references "
"or staged repair and inspect the result."}
def _action(name, title, description, run, properties=None, required=(), destructive=False, open_world=False,
@@ -278,7 +282,7 @@ ACTIONS = dict([
_action("set_prompt", "Write a prompt",
"Writes text into the workflow's positive or negative prompt box (or the one on node_id). "
"mode=append adds to what is there. One Ctrl+Z step.",
set_prompt, {"prompt": {"type": "string"}, "role": {"type": "string", "enum": ["positive", "negative"], "default": "positive"},
set_prompt, {"prompt": _PROMPT, "role": {"type": "string", "enum": ["positive", "negative"], "default": "positive"},
"node_id": _NODE, "mode": {"type": "string", "enum": ["replace", "append"], "default": "replace"}},
["prompt"], destructive=True),
_action("set_model", "Swap a node's model",
@@ -332,7 +336,7 @@ ACTIONS = dict([
"wait_seconds": {"type": "number", "minimum": 0, "maximum": 55, "default": 55,
"description": "Seconds to wait for it to end."},
"workflow": {"type": "string", "description": "A name from list_workflows."},
"prompt": {"type": "string"}, "negative": {"type": "string"},
"prompt": _PROMPT, "negative": {"type": "string"},
"seed": {"type": "integer", "minimum": 0},
"width": {"type": "integer", "minimum": 16, "maximum": 16384},
"height": {"type": "integer", "minimum": 16, "maximum": 16384},
+4
View File
@@ -252,6 +252,10 @@ descriptions. Its picks go to `/anomalous/scan_all` as `targets`, like a list pa
## MCP endpoint
The `prompt` schemas for `set_prompt` and `run_workflow` share concise pose guidance for
agents composing prompts: choose a model-appropriate pose when flexible and preserve explicit
requests and supplied text. This is advice in the MCP tool description; AMB passes text through.
`track_run(prompt_ids, task, wait_seconds)` attaches existing submissions from this server to
an open task without running anything. IDs must exist in its queue/history; each is owned by
one recorded run. Retrying an identical batch returns that run, not the task's newest run.
+1 -1
View File
@@ -103,7 +103,7 @@ claude mcp add --transport http anomalous http://127.0.0.1:8188/anomalous/mcp
| find_nodes | 搜索最多五个节点摘要;需要具体参数和选项时,用 `types=[节点类型]` 读取 |
| add_node / connect_nodes | 添加节点并按唯一类型自动连线,或把节点插进已有路径;见下方例子 |
| add_nodes | 一次加一组节点:按 ComfyUI 的 API 格式写,组里的节点互相连,也能连画布上已有的节点(写 `"#12"`,输出写编号或名字),排成一块放在空位上,整组算一步撤销 |
| set_prompt | 改写或追加正向/反向提示词 |
| set_prompt | 改写或追加正向/反向提示词。AI 自己写提示词时,姿势可以选择的话会优先考虑模型容易画清楚的动作;你指定的姿势和提供的文本仍按你的要求处理。`run_workflow` 的提示词也有同样的建议 |
| set_model | 换某个加载器节点里的模型 |
| add_lora | 插入一个 LoRA,默认接在主模型加载器和已有的 LoRA 后面。LoRA 文件里练过文本编码器的(SD1.5、SDXL、Illustrious 的大多是),CLIP 线也接上:从 checkpoint 接,或者从 UNet 工作流里单独的 CLIP 加载器接,正反向提示词一起改接到它后面;没练过的(多数 Flux、Anima 的 LoRA)只接模型线。LoRA 和主模型的底模对不上时(SD 1.5 的 LoRA 用在 SDXL 上),回复里会提醒 AI 并告诉它按底模去找;换模型(set_model)也一样 |
| place_combo | 把一个搭配作为一组新节点摆到画布上,原有节点不动 |