The Knowledge Base directory was entered in two places — the Configuration node's knowledge_base path and the Knowledge Base Loader node's path — a duplication with no benefit. Remove the Knowledge Base Loader node and have the Configuration node load the Knowledge Base itself, emitting it on a new knowledge_base output wired into the Resolver. - New nodes/kb_loading.py holds the shared, process-wide load-once cache and package-relative path resolution (extracted from the deleted loader node). - Configuration node: gains a knowledge_base_reload input and a KNOWLEDGE_BASE output; RETURN is now (config, knowledge_base, warnings, errors). A KB load failure surfaces on errors while the config is still emitted (the Analyzer and Validator do not need the KB). - Remove SceneCompilerKnowledgeBaseLoader from the node registrations. - Rebuild the example workflow to wire Configuration.knowledge_base -> Resolver. - Docs (README, docs/nodes.md) updated; tests moved to test_kb_loading.py. BREAKING CHANGE: the Knowledge Base Loader node is removed. Workflows that used it must load the Knowledge Base via the Configuration node's knowledge_base output. Co-authored-by: kunail0804 <kunail0804@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Examples
Ready-to-use examples for Scene Compiler.
Workflow
workflows/scene_compiler_pipeline.json
is a ComfyUI workflow wiring the full pipeline:
Configuration ─┬─▶ Scene Validator ─▶ Resolver ─▶ Category Splitter ─▶ Prompt Builder
├──────────────────────▶ (config) (config) ◀┘
Knowledge Base Loader ─────────────────▶ Resolver (knowledge_base)
Scene Analyzer ─▶ Scene Validator (scene)
Load it in ComfyUI (Load → pick the file). The Scene Analyzer requires a local Ollama instance; the rest of the pipeline runs offline.
Scene JSON examples
Each scenes/*.scene.json is a Scene JSON document (the Analyzer's output form),
and each matching scenes/*.prompts.json is the exact prompt output it compiles
to with the shipped Knowledge Base and default configuration:
| Scene | Highlights |
|---|---|
single_character |
one character, appearance, clothing, environment, camera, lighting |
couple_interaction |
two characters, an interaction, and an expansion (school_uniform → blazer, pleated_skirt) |
The *.prompts.json outputs are verified by tests/test_examples.py. To skip the
Analyzer and compile a Scene JSON directly, feed it through the Validator →
Resolver → Category Splitter → Prompt Builder nodes (or the compiler API).
Note: the workflow JSON is provided as a starting point; verify it loads in your ComfyUI and re-save if ComfyUI adjusts the layout.