Nodes/DiffusionGemma Prompt Builder/DiffusionGemma SplatStage Efficient Planner (Experimental)
ComfyUI Node

DiffusionGemma SplatStage Efficient Planner (Experimental)

The same show, in one call — and cached so you don't pay twice

By exportAnything·Created 2 months ago·Updated a day ago· 44
DiffusionGemma SplatStage Efficient Planner (Experimental)
  • model_config
  • gemma_context
  • blueprint_json
  • is_valid
  • validation_errors_json
  • raw_response
root_seed26073001
temperature0.35
max_new_tokens3072
reuse_cached_blueprinttrue

If DiffusionGemmaSplatStagePlanner is the strict, careful way to write a SplatStage show blueprint, this is its cost-optimized sibling - the one-call planner aimed at the efficient full-song node workflow. Same experimental family, same refusal to render anything, but it trades the per-lane planning widgets for a leaner contract and a disk cache, because when you're iterating on a full song the expensive part isn't the thinking - it's calling a 26B model to do it twice.

How it's different from the strict planner

Look at the inputs and the difference is obvious: there's no duration_seconds and no aspect_ratio. The efficient full-song workflow supplies its own settings, so this node doesn't ask. Instead you get a bigger token budget (max_new_tokens defaults to 3072, up to 4096 - the README frames it as the higher-variation efficient blueprint) and a reuse_cached_blueprint toggle that defaults to on. When enabled, the node writes every valid blueprint to a local JSON cache keyed by your prompt plus root_seed; on the next run it checks the cache first, and only if the cached entry is missing or fails validation does it wake DiffusionGemma and pay for a fresh call. A diagnostic raw_response.json lands beside the cache so you can see what actually happened.

The flow otherwise matches the strict planner: one backend call against the shipped schema, JSON extraction, schema validation, and a single bounded repair call if the first draft is invalid - then a loud failure rather than a quietly-bad blueprint if repair can't fix it. Seeding is deterministic too: same prompt, same root_seed, same show.

Inputs and outputs

Required inputs are model_config (from the DiffusionGemma Model Loader), gemma_context (from the Context Hub), root_seed (default 26073001), temperature (0.35), max_new_tokens (3072), and reuse_cached_blueprint. Outputs: blueprint_json, is_valid, validation_errors_json, and raw_response, displayed in the UI as an output node.

The honest caveats

This is still an experimental, top-of-stack node. It needs the full Director stack - the 26B NVFP4 DiffusionGemma model loaded through DiffusionGemmaModelLoader and context from the Context Hub - so the Blackwell-era hardware floor applies: NVFP4 is optimized for CUDA 12.0 cards, older GPUs run it slowly, and ~18GB of VRAM is the practical minimum. And like its strict sibling, it only plans: executing the show still needs the downstream SplatStage workflow and nodes, which aren't part of this repo.

Leave reuse_cached_blueprint on during iteration - that's the entire point - and remember the cache key includes your prompt and seed, so a real creative change invalidates it correctly. Install via ComfyUI Manager (search "DiffusionGemma Prompt Builder") or git clone https://github.com/exportAnything/ComfyUI-DiffusionGemmaPromptBuilder into custom_nodes.

Categoryprompt/diffusiongemma/experimental-motion-planning

Inputs (6)

NameTypeDefaultDescription
model_configDG_MODEL_CONFIG
gemma_contextDG_CONTEXT
root_seedINT260730010–9223372036854776000
temperatureFLOAT0.350–1
max_new_tokensINT30721024–4096
reuse_cached_blueprintBOOLEANtrue

Outputs (4)

NameTypeDescription
blueprint_jsonSTRING
is_validBOOLEAN
validation_errors_jsonSTRING
raw_responseSTRING