Generate LTX2 Prompt
LTX-2's own prompt enhancer, baked in
- clip
- image
- video
- audio
- generated_text
LTX-2's open-weights release came with a hidden trap: the model really wants its prompts written in a very specific style - integrated audio, chronological flow, present-progressive verbs, exact dialogue in quotes - and a bare "a woman at a coffee shop" turns into mush. Generate LTX2 Prompt (TextGenerateLTX2Prompt) is the fix, shipped as a core node. It's the same prompt-enhancer trick the LTX team themselves recommend, now a first-class ComfyUI citizen instead of a copy-pasted block of system prompt text.
Honestly, the cleanest way to think of it: it's Generate Text with training wheels. Same inputs, same output, same mechanism - but instead of you writing a system prompt, the node hard-codes LTX's official prompt-engineering rules and wraps your raw input in the Gemma chat template for you. You give it "a woman at a coffee shop talking on the phone"; it returns a full paragraph with style, camera-safe framing, ambient sound, and the woman's actual spoken words in quotes.
How it works
The node is a subclass of TextGenerate that does exactly one extra thing before calling it: it takes your prompt, wraps it in <start_of_turn>system…<end_of_turn> chat turns around a built-in system prompt, and appends your input as the user turn. There are two system prompts baked in, and it picks based on whether you fed it an image:
- No image - the text-to-video version. Expands your scene into a full cinematic description with a "Style:" prefix, a soundscape, and temporal connectors ("as," "then," "while"). Tells the LLM not to invent camera motion you didn't ask for and not to add dialogue you didn't request.
- Image connected - the image-to-video version. Injects the image via a soft token (so the model can see the first frame) and tells the LLM to describe only what changes from the image, since re-describing established details causes scene cuts.
From there it's all standard TextGenerate behavior - tokenize, sample, decode - so everything in that article applies: sampling_mode on/off with temperature and friends, max_length, thinking, and the optional image/video/audio inputs.
Inputs and outputs
- clip - this one matters. LTX-2's text encoder is Gemma 3 12B, so load that (or a compatible Gemma) from
text_encoderswith the regular CLIP loader and feed it here. Using a weaker encoder means the enhanced prompt gets worse. - prompt - your raw scene description. Keep it short; the whole point is expansion. The I2V system prompt explicitly says it will only lightly edit a prompt that's already detailed and chronological, so write sparse and let it run.
- Everything else - max_length, sampling_mode, thinking, use_default_template - works exactly like Generate Text.
Output is a single generated_text string, which you feed into your LTX-2 conditioning's text input in place of your original prompt.
Common issues
The real-world pain with this node is rarely the node itself - it's the Gemma 3 12B encoder underneath. It's massive (about 22 GB in fp16) and was the source of LTX-2's launch-day OOM errors, even on 16 GB cards. Community fixes: use an fp8 or 4-bit quant of Gemma (Unsloth's 4-bit runs around 7 GB), or skip the enhancer entirely and write a good prompt yourself - a genuinely common take was "bypass Gemma and write better prompts." The enhancer also adds generation time to every run, so if your scene is already detailed or you're iterating, you may not want it in the loop. And remember the input it wants is your raw idea, not an already-polished prompt - give it garbage in, get polished-but-wrong out.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| prompt | STRING | — | |
| max_length | INT | 5121–32768 | — |
| sampling_mode | COMBO | 2 options: [object Object], [object Object] | |
| imageopt | IMAGE | — | |
| videoopt | IMAGE | Video frames as image batch. Assumed to be 24 FPS; subsampled to 1 FPS internally. | |
| audioopt | AUDIO | — | |
| thinkingopt | BOOLEAN | false | Operate in thinking mode if the model supports it. |
| use_default_templateopt | BOOLEAN | true | Use the built in system prompt/template if the model has one. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| generated_text | STRING | — |