Files
kunail0804-ComfyUI-Scene-Co…/examples/README.md
T
02c3153359 docs(examples): add example workflow, scenes, and expected outputs (#30) (#74)
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>
2026-07-09 13:54:08 +02:00

37 lines
1.7 KiB
Markdown

# Examples
Ready-to-use examples for Scene Compiler.
## Workflow
[`workflows/scene_compiler_pipeline.json`](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](https://ollama.com) 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`](scenes/single_character.scene.json) | one character, appearance, clothing, environment, camera, lighting |
| [`couple_interaction`](scenes/couple_interaction.scene.json) | 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.