Ship ready-to-use examples (MASTER_SPEC §24, Phase 7). - examples/workflows/scene_compiler_pipeline.json: a ComfyUI workflow wiring Configuration + Knowledge Base Loader + Analyzer -> Validator -> Resolver -> Category Splitter -> Prompt Builder. - examples/scenes/*.scene.json: standalone example Scene JSON documents (single character; two characters with an interaction and an expansion). - examples/scenes/*.prompts.json: the exact prompt outputs each scene compiles to with the shipped Knowledge Base and default config. - examples/README.md: how to load the workflow and use the scene examples. tests/test_examples.py asserts each example Scene JSON compiles to its documented outputs, and that the workflow references only registered Scene Compiler nodes and includes the full pipeline. The workflow JSON still wants a ComfyUI visual check. Co-authored-by: kunail0804 <kunail0804@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
173 lines
6.5 KiB
JSON
173 lines
6.5 KiB
JSON
{
|
|
"last_node_id": 7,
|
|
"last_link_id": 8,
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"type": "SceneCompilerConfiguration",
|
|
"pos": [40, 40],
|
|
"size": [300, 400],
|
|
"flags": {},
|
|
"order": 0,
|
|
"mode": 0,
|
|
"inputs": [],
|
|
"outputs": [
|
|
{ "name": "config", "type": "COMPILER_CONFIG", "links": [1, 2, 3], "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, 60, "knowledge_base/", true, true, true, 8, false,
|
|
"easy_illustrious", ",", true, true, false, "basic", ""
|
|
]
|
|
},
|
|
{
|
|
"id": 2,
|
|
"type": "SceneCompilerKnowledgeBaseLoader",
|
|
"pos": [40, 480],
|
|
"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, 260],
|
|
"flags": {},
|
|
"order": 2,
|
|
"mode": 0,
|
|
"inputs": [],
|
|
"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 }
|
|
],
|
|
"properties": { "Node name for S&R": "SceneCompilerAnalyzer" },
|
|
"widgets_values": [
|
|
"A blonde girl wearing a dress smiles in a classroom at sunset.",
|
|
"llama3", 0.0, 60, ""
|
|
]
|
|
},
|
|
{
|
|
"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 }
|
|
],
|
|
"properties": { "Node name for S&R": "SceneCompilerValidator" },
|
|
"widgets_values": []
|
|
},
|
|
{
|
|
"id": 5,
|
|
"type": "SceneCompilerResolver",
|
|
"pos": [1060, 40],
|
|
"size": [280, 140],
|
|
"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": "resolved_tags", "type": "RESOLVED_TAGS", "links": [7], "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": "SceneCompilerResolver" },
|
|
"widgets_values": []
|
|
},
|
|
{
|
|
"id": 6,
|
|
"type": "SceneCompilerCategorySplitter",
|
|
"pos": [1360, 40],
|
|
"size": [280, 100],
|
|
"flags": {},
|
|
"order": 5,
|
|
"mode": 0,
|
|
"inputs": [{ "name": "resolved_tags", "type": "RESOLVED_TAGS", "link": 7 }],
|
|
"outputs": [
|
|
{ "name": "category_map", "type": "CATEGORY_MAP", "links": [8], "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": "SceneCompilerCategorySplitter" },
|
|
"widgets_values": []
|
|
},
|
|
{
|
|
"id": 7,
|
|
"type": "SceneCompilerPromptBuilder",
|
|
"pos": [1660, 40],
|
|
"size": [300, 520],
|
|
"flags": {},
|
|
"order": 6,
|
|
"mode": 0,
|
|
"inputs": [
|
|
{ "name": "category_map", "type": "CATEGORY_MAP", "link": 8 },
|
|
{ "name": "config", "type": "COMPILER_CONFIG", "link": 3 }
|
|
],
|
|
"outputs": [
|
|
{ "name": "character", "type": "STRING", "links": null, "slot_index": 0 },
|
|
{ "name": "appearance", "type": "STRING", "links": null, "slot_index": 1 },
|
|
{ "name": "hair", "type": "STRING", "links": null, "slot_index": 2 },
|
|
{ "name": "face", "type": "STRING", "links": null, "slot_index": 3 },
|
|
{ "name": "eyes", "type": "STRING", "links": null, "slot_index": 4 },
|
|
{ "name": "expression", "type": "STRING", "links": null, "slot_index": 5 },
|
|
{ "name": "body", "type": "STRING", "links": null, "slot_index": 6 },
|
|
{ "name": "clothing", "type": "STRING", "links": null, "slot_index": 7 },
|
|
{ "name": "accessories", "type": "STRING", "links": null, "slot_index": 8 },
|
|
{ "name": "pose", "type": "STRING", "links": null, "slot_index": 9 },
|
|
{ "name": "action", "type": "STRING", "links": null, "slot_index": 10 },
|
|
{ "name": "interaction", "type": "STRING", "links": null, "slot_index": 11 },
|
|
{ "name": "objects", "type": "STRING", "links": null, "slot_index": 12 },
|
|
{ "name": "environment", "type": "STRING", "links": null, "slot_index": 13 },
|
|
{ "name": "camera", "type": "STRING", "links": null, "slot_index": 14 },
|
|
{ "name": "lighting", "type": "STRING", "links": null, "slot_index": 15 },
|
|
{ "name": "style", "type": "STRING", "links": null, "slot_index": 16 },
|
|
{ "name": "quality", "type": "STRING", "links": null, "slot_index": 17 },
|
|
{ "name": "miscellaneous", "type": "STRING", "links": null, "slot_index": 18 },
|
|
{ "name": "negative", "type": "STRING", "links": null, "slot_index": 19 },
|
|
{ "name": "scene", "type": "STRING", "links": null, "slot_index": 20 }
|
|
],
|
|
"properties": { "Node name for S&R": "SceneCompilerPromptBuilder" },
|
|
"widgets_values": []
|
|
}
|
|
],
|
|
"links": [
|
|
[1, 1, 0, 4, 1, "COMPILER_CONFIG"],
|
|
[2, 1, 0, 5, 2, "COMPILER_CONFIG"],
|
|
[3, 1, 0, 7, 1, "COMPILER_CONFIG"],
|
|
[4, 2, 0, 5, 1, "KNOWLEDGE_BASE"],
|
|
[5, 3, 0, 4, 0, "SCENE"],
|
|
[6, 4, 0, 5, 0, "SCENE"],
|
|
[7, 5, 0, 6, 0, "RESOLVED_TAGS"],
|
|
[8, 6, 0, 7, 0, "CATEGORY_MAP"]
|
|
],
|
|
"groups": [],
|
|
"config": {},
|
|
"extra": {},
|
|
"version": 0.4
|
|
}
|