feat(nodes): centralize duplicated settings on Configuration + add tooltips (#144)

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: kunail0804 <kunail0804@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Crespin Alexandre
2026-07-16 16:26:18 +02:00
committed by GitHub
co-authored by kunail0804 Claude Opus 4.8
parent e49c282879
commit 712be0d30a
9 changed files with 362 additions and 69 deletions
+14
View File
@@ -5,6 +5,7 @@ from __future__ import annotations
import json
import nodes
from compiler.common.config import Config
from compiler.common.knowledge_base import KnowledgeBase
from nodes.knowledge_base_loader_node import KnowledgeBaseLoaderNode
@@ -60,6 +61,19 @@ def test_reload_input_is_accepted(tmp_path) -> None:
assert isinstance(kb, KnowledgeBase)
def test_config_path_overrides_the_widget(tmp_path) -> None:
# A connected Configuration node is the single source of truth: its Knowledge
# Base path wins over the node's own ``path`` widget.
config_path = write_kb(
tmp_path, [{"id": "long_hair", "tags": ["long hair"], "category": "hair"}]
)
config = Config.from_json({"resolver": {"knowledge_base": config_path}})
kb, warnings, errors, *_ = KnowledgeBaseLoaderNode().run("does/not/exist", config=config)
assert isinstance(kb, KnowledgeBase)
assert kb.get("long_hair") is not None
assert (warnings, errors) == ("", "")
def test_registered_for_comfyui() -> None:
assert nodes.NODE_CLASS_MAPPINGS["SceneCompilerKnowledgeBaseLoader"] is KnowledgeBaseLoaderNode
assert (