IAMCCS Gemma Assist Lazy Gate
Skip the LLM call entirely when you don't need the assistant
- text
- enabled
If you've ever had a workflow where a big model runs on every queue - even when you've already made your choice and just want to re-render - you know the waste. The Gemma Assist Lazy Gate is IAMCCS's answer to that specific annoyance in their Ideogram storyboard pipeline. It's a gate in front of a Gemma-based prompt-assist branch that only runs the expensive branch when you actually want it.
The "lazy" in the name is doing real work here. It's not just a toggle - it's a lazy-evaluation gate, which in ComfyUI terms means the upstream Gemma node doesn't execute at all when the gate is off.
How it works
The node has one enabled BOOLEAN. When it's true, it passes through the gemma_text input unchanged and reports enabled = true. When false, it emits disabled_text instead - the default message being a polite "Gemma Assist disabled."
The clever part is ComfyUI's lazy input mechanism. The node declares gemma_text as a lazy: true input and implements check_lazy_status: if enabled is false, it tells ComfyUI it doesn't need that input, so everything upstream that only feeds the Gemma branch is skipped. That's the difference between a simple switch (which still computes the value) and this gate (which makes ComfyUI prune the branch). On a video or storyboard graph where the Gemma call pulls in a local LLM, that's real seconds saved per queue.
Outputs are text (either the real Gemma output or the placeholder) and enabled (the boolean state). The enabled output is what you wire into a conditional if you want the rest of the graph to behave differently based on whether the assistant ran.
Inputs that matter
enabled- the only real decision. Flip it off for plain re-runs.gemma_text- optional; the text from your Gemma node. Wire it and it's skipped when disabled.disabled_text- optional message for when the gate is off; the default is fine.
Install
Part of IAMCCS-nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
Or ComfyUI Manager → "IAMCCS" → install → restart. It doesn't bundle a Gemma model - you're expected to have the Gemma assist node that produces gemma_text elsewhere in your graph.
Gotchas
The lazy skip only works if the gate is between the Gemma node and the graph's consumers, and if the Gemma node is only reachable through this gate. If something else also connects to the Gemma node directly, ComfyUI will still run it. Also note the gate passes strings - the actual "assistant" work (prompt enhancement, sheet suggestions) lives in the Gemma node upstream, so don't expect the gate itself to think. It's plumbing, but it's plumbing that saves you from loading an LLM you don't need.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | false | — |
| disabled_text | STRING | Gemma Assist disabled. Enable this gate to run only the assistant branch. | — |
| gemma_textopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| enabled | BOOLEAN | — |