Sana Text Encode
Prompting through Gemma2 instead of CLIP or T5
- GEMMA
- CONDITIONING
Sana skips CLIP and T5 entirely and conditions on Gemma2 2B, Google's small open LLM, as its text encoder. That was ahead of its time - by 2026 encoding prompts through a general-purpose LLM instead of a CLIP/T5 pair became the mainstream approach across newer models, but Sana was doing it earlier. Practically, that should mean better handling of natural, descriptive prompts than a CLIP-only model gets you, since Gemma2 actually understands language rather than just aligning tokens to image features. How much of that pays off in practice depends a lot on how well this pack's specific Sana implementation is holding together - its own README recommends the official Sana devs' fork if you run into trouble, which is a fair signal to keep in mind going in.
What it does
Same basic job as any text-encode node - turn your prompt into a CONDITIONING the sampler can use - just routed through Gemma2 instead of tokenizing against a fixed CLIP vocabulary.
- text - STRING, multiline. Write plain, natural-language descriptions here rather than CLIP-style comma-separated tag soup; that's the kind of input an LLM encoder is actually built to use well.
- GEMMA - the loaded encoder, from this pack's own Gemma Loader node.
Output: CONDITIONING - typically routed through Sana Resolution Cond next (to bake in your target resolution) before it reaches the KSampler.
Installing it
Part of the whole ComfyUI_ExtraModels pack:
- ComfyUI Manager - search "Extra Models for ComfyUI", install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/city96/ComfyUI_ExtraModels, thenpip install -r requirements.txt. Restart.
The Gemma Loader node auto-downloads the Gemma2 weights from Hugging Face on first use. The README specifically recommends the 4-bit quantized version on CPU if you're tight on memory - Gemma2 adds real RAM/VRAM overhead on top of whatever the Sana diffusion checkpoint itself needs.
Common issues
Your first run will pause while Gemma2 downloads in the background - check your console log before assuming ComfyUI has hung.
If you're VRAM-constrained running Gemma2 and Sana's diffusion model together, that's exactly the scenario the Gemma Loader's CPU + 4-bit option is for - slower encoding in exchange for keeping the diffusion model's VRAM budget intact.
Beyond that, this node inherits the same general caveats as the rest of Sana support in this pack: it's the part of ComfyUI_ExtraModels the maintainer is least confident in right now, and there's a documented case of the pack's Sana checkpoint loader not correctly recognizing newer Sana1.5 releases. If output quality seems off relative to what Sana's own examples show, that's more likely a pack-implementation gap than something wrong with your prompt.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| GEMMA | GEMMA | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |