Files
ComfyUI/comfy
Jukka Seppänen be95871adc feat: Gemma4 text generation support (CORE-30) (#13376)
* 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
2026-05-02 22:46:15 -04:00
..
2024-06-27 18:43:11 -04:00
2026-02-26 01:30:31 -05:00
2025-01-24 06:15:54 -05:00
2026-03-14 18:36:29 -04:00
2025-07-06 07:07:39 -04:00
2026-01-01 22:06:14 -05:00
2026-04-29 19:30:08 -04:00
2026-04-29 19:30:08 -04:00
2026-03-14 18:36:29 -04:00