H3 Context Compiler:
The H3 Context Compiler turns a normalized creative plan into a native-H3 prompt using the explicit prompt profile associated with that plan. Its main purpose is to provide a consistent translation between structured creative intentions and the text prepared for a later H3 generation step. It uses deterministic rendering rather than asking a model to rewrite your instructions, helping make prompt preparation repeatable for the same plan and rendering profile. The node also supports traceability and subsequent validation, making it easier to inspect how a prompt was prepared before proceeding. This is a prompt-compilation stage, not a generation stage: it does not execute a provider request or generate media.
H3 Context Compiler Input Parameters:
plan
Required input of type H3_CONTEXT_PLAN. Connect the validated, typed plan from H3 Context Plan, as specified by the input tooltip. This is a structured plan object rather than an ordinary text prompt; it supplies the normalized instructions and explicit H3 prompt profile used for rendering. Its contents therefore determine what the compiler renders and which rendering profile it follows. If you need to change the creative instructions or profile, make those changes upstream when preparing the plan, since this node exposes no separate rendering controls. No default value, minimum, maximum, or selectable options are defined for this input; it is a required connection rather than a numeric or text widget.
H3 Context Compiler Output Parameters:
prompt
Output of type H3_PROMPT_STRING containing the final native-H3 prompt string. This is the text produced by rendering the supplied plan with its explicit prompt profile. It represents the prepared instructions for a later H3 execution stage, not a generated image, video, audio result, or confirmation that a provider request has run. Use this output wherever your downstream workflow expects the compiled H3 prompt, keeping in mind that its socket type is specifically H3_PROMPT_STRING.
report
Output of type H3_CONTEXT_REPORT containing the render and provenance report. It accompanies the compiled prompt with information about its rendering and provenance, meaning its origin and preparation history. This supports inspection and traceability when you need to understand how the prompt was prepared. The provided code does not define the report’s individual fields, so you should not assume it contains particular scores, warnings, or provider execution results.
prompt_document
Output of type H3_PROMPT_DOCUMENT containing the rendered prompt document intended for validation. Unlike the plain prompt string, this is a structured document that downstream validation can inspect. It helps keep prompt preparation and prompt checking as distinct workflow stages, so you can validate the rendered result before moving toward provider execution. The supplied interface does not expose the document’s internal fields; treat it as a typed connection for compatible downstream nodes rather than as an editable text field.
H3 Context Compiler Usage Tips:
- Connect
planto the validated plan produced by H3 Context Plan. Do not substitute a raw prompt string, JSON text, or another object simply because it describes the same creative idea. - Configure creative instructions and the explicit H3 prompt profile upstream. The compiler has no local controls for profile selection, prompt length, sampling, or generation quality.
- Use the compiler’s deterministic rendering to compare revisions: compile a plan, change your upstream instructions, and inspect the resulting prompt and report. Keep the rendering profile unchanged when you want to focus your comparison on instruction changes.
- Pass
prompt_documentto a compatible validation stage before provider execution when your workflow requires checking the rendered result. Successful compilation alone should not be treated as completion of a separate validation or generation stage. - Keep
reportavailable when reviewing or troubleshooting your workflow. Its purpose is to provide rendering and provenance information alongside the final text. - Connect the outputs to downstream processing or inspection nodes that will actually run. This compiler is not marked as an output node, so it should not be relied on as a standalone workflow execution endpoint.
H3 Context Compiler Common Errors and Solutions:
Missing required input: plan
- Explanation: This is a descriptive troubleshooting label, not a confirmed verbatim error message. The interface requires
planand provides no default, so the node cannot perform its intended compilation without a plan supplied during execution. - Solution: Connect the validated
H3_CONTEXT_PLANoutput from H3 Context Plan toplanand confirm that the upstream node completes successfully.
Incompatible connection to plan
- Explanation: This is a descriptive connection issue rather than a quoted source-code message. The input expects
H3_CONTEXT_PLAN, not a plain string or another H3 object type. A connection with a different socket type does not satisfy this contract. - Solution: Check the upstream socket type and use the plan-producing node rather than a prompt, report, or prompt-document output. If you have only written instructions, prepare them through the upstream planning workflow first.
PipelineNodeError: compilation diagnostics
- Explanation: When the underlying compiler raises
CanonicalContextPipelineError, this node converts it toPipelineNodeErrorusing the original diagnostics. The exact message depends on the compiler failure; the provided source does not list the diagnostic strings or all conditions that produce them. - Solution: Read the accompanying diagnostics and correct the issue they identify in the upstream plan or its rendering profile. Rebuild the plan through H3 Context Plan, then run compilation again. Avoid changing unrelated settings unless the diagnostics point to them.
Plan accepted before execution, but compilation fails when run
- Explanation: This is a troubleshooting symptom, not a literal error message. During ComfyUI’s pre-execution checks, a linked plan may be unavailable. The node explicitly allows that case to pass preliminary validation, so passing that check does not guarantee that the eventual plan can be compiled.
- Solution: Inspect the error reported during execution and verify the actual plan produced upstream. Resolve any compiler diagnostics, then rerun the workflow; reconnecting the input alone will not fix invalid plan contents.
