Non-thinking mode primes a "final" channel, so the Gemma 4 tokenizer decodes
that channel's close marker to a bare </think> with no opening tag. Splitting on
the last </think> then kept everything after it, which is nothing: the node
output an empty string, blanking both Preview Any and the positive conditioning
it feeds in the Text to Video (LTX-2.5) template.
Fall back to the text before the unmatched close, and to the user prompt when
nothing usable is left, which is what both system prompts already ask for.
* initial gemma4 support
* parity with reference implementation
outputs can 100% match transformers with same sdpa flags, checkpoint this and then optimize
* Cleanup, video fixes
* cleanup, enable fused rms norm by default
* update comment
* Cleanup
* Update sd.py
* Various fixes
* Add fp8 scaled embedding support
* small fixes
* Translate think tokens
* Fix image encoder attention mask type
So it works with basic attention
* Handle thinking tokens different only for Gemma4
* Code cleanup
* Update nodes_textgen.py
* Use embed scale class instead of buffer
Slight difference to HF, but technically more accurate and simpler code
* Default to fused rms_norm
* Update gemma4.py