Files
kunail0804-ComfyUI-Scene-Co…/examples/workflows/scene_compiler_pipeline.json
T
b863e53754 fix(examples): refresh workflow widget values (bugs 1 & 2) (#147)
* feat(nodes): centralize duplicated settings on Configuration + add tooltips

The Scene Analyzer built its own Config from local model_name/temperature/
timeout/system_prompt widgets and ignored the Configuration node entirely, so
the analyzer model was set in two disconnected places (bug report #4).

- Scene Analyzer: add an optional `config` (COMPILER_CONFIG) input and drop the
  duplicated model/temperature/timeout widgets. Settings now come from the
  Configuration node; without one, defaults apply with a 300 s cold-load-friendly
  timeout. A non-empty `system_prompt` widget still overrides the config.
- Knowledge Base Loader: accept an optional `config`; when wired, its KB path and
  version take precedence over the node's own widgets.
- Add tooltips to every input on all six nodes.

Docs (docs/nodes.md) updated for the Analyzer/KB Loader input changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(examples): refresh workflow widget values; guard against widget drift

The shipped example workflow carried stale positional widget values from before
V2 removed prompt_builder.trim_empty_outputs from the Configuration node. ComfyUI
stores widgets positionally, so every later value shifted: debug_level received a
leftover boolean ("false") and, in older saved workflows, the prompt separator
received a boolean ("true") instead of ",".

- Rebuild the Configuration node's 21 widget values in the current order.
- Update the Analyzer node to the current shape (natural_language + system_prompt;
  config now arrives via a wired COMPILER_CONFIG input) and wire the Configuration
  node into it.
- Add the KB Loader's version widget value.
- New regression test: every example-workflow node's widgets_values length must
  match the node's current widget count, so this drift cannot recur silently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: kunail0804 <kunail0804@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 16:29:58 +02:00

121 lines
4.0 KiB
JSON

{
"last_node_id": 5,
"last_link_id": 7,
"nodes": [
{
"id": 1,
"type": "SceneCompilerConfiguration",
"pos": [40, 40],
"size": [300, 560],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{ "name": "config", "type": "COMPILER_CONFIG", "links": [1, 2, 7], "slot_index": 0 },
{ "name": "errors", "type": "STRING", "links": null, "slot_index": 1 }
],
"properties": { "Node name for S&R": "SceneCompilerConfiguration" },
"widgets_values": [
"llama3", 0.0, 3, 300, "knowledge_base/", true, true, true, 8, false, false,
"easy_illustrious", ",", true, false, "basic", "", "", false, 0.5, "char_ngram"
]
},
{
"id": 2,
"type": "SceneCompilerKnowledgeBaseLoader",
"pos": [40, 640],
"size": [300, 100],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{ "name": "knowledge_base", "type": "KNOWLEDGE_BASE", "links": [4], "slot_index": 0 },
{ "name": "warnings", "type": "STRING", "links": null, "slot_index": 1 },
{ "name": "errors", "type": "STRING", "links": null, "slot_index": 2 }
],
"properties": { "Node name for S&R": "SceneCompilerKnowledgeBaseLoader" },
"widgets_values": ["knowledge_base/", 0, ""]
},
{
"id": 3,
"type": "SceneCompilerAnalyzer",
"pos": [380, 40],
"size": [340, 200],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{ "name": "config", "type": "COMPILER_CONFIG", "link": 7 }
],
"outputs": [
{ "name": "scene", "type": "SCENE", "links": [5], "slot_index": 0 },
{ "name": "warnings", "type": "STRING", "links": null, "slot_index": 1 },
{ "name": "errors", "type": "STRING", "links": null, "slot_index": 2 },
{ "name": "raw", "type": "STRING", "links": null, "slot_index": 3 }
],
"properties": { "Node name for S&R": "SceneCompilerAnalyzer" },
"widgets_values": [
"A blonde girl wearing a dress smiles in a classroom at sunset.",
""
]
},
{
"id": 4,
"type": "SceneCompilerValidator",
"pos": [760, 40],
"size": [280, 120],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{ "name": "scene", "type": "SCENE", "link": 5 },
{ "name": "config", "type": "COMPILER_CONFIG", "link": 1 }
],
"outputs": [
{ "name": "scene", "type": "SCENE", "links": [6], "slot_index": 0 },
{ "name": "warnings", "type": "STRING", "links": null, "slot_index": 1 },
{ "name": "errors", "type": "STRING", "links": null, "slot_index": 2 },
{ "name": "raw", "type": "STRING", "links": null, "slot_index": 3 }
],
"properties": { "Node name for S&R": "SceneCompilerValidator" },
"widgets_values": []
},
{
"id": 5,
"type": "SceneCompilerResolver",
"pos": [1060, 40],
"size": [300, 160],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{ "name": "scene", "type": "SCENE", "link": 6 },
{ "name": "knowledge_base", "type": "KNOWLEDGE_BASE", "link": 4 },
{ "name": "config", "type": "COMPILER_CONFIG", "link": 2 }
],
"outputs": [
{ "name": "prompt", "type": "STRING", "links": null, "slot_index": 0 },
{ "name": "warnings", "type": "STRING", "links": null, "slot_index": 1 },
{ "name": "errors", "type": "STRING", "links": null, "slot_index": 2 },
{ "name": "json", "type": "STRING", "links": null, "slot_index": 3 }
],
"properties": { "Node name for S&R": "SceneCompilerResolver" },
"widgets_values": []
}
],
"links": [
[1, 1, 0, 4, 1, "COMPILER_CONFIG"],
[2, 1, 0, 5, 2, "COMPILER_CONFIG"],
[4, 2, 0, 5, 1, "KNOWLEDGE_BASE"],
[5, 3, 0, 4, 0, "SCENE"],
[6, 4, 0, 5, 0, "SCENE"],
[7, 1, 0, 3, 0, "COMPILER_CONFIG"]
],
"groups": [],
"config": {},
"extra": {},
"version": 0.4
}