Back to Blog
Production

LTX-2.5 Prompt Enhancer: Understanding Gemma 4 With LTX

The LTX-2.5 prompt enhancer uses Gemma 4 E2B to expand your prompts before encoding. See where it runs, when to switch it on, and when to leave it off.

LTX Team
Production
LTX-2.5 Prompt Enhancer: Understanding Gemma 4 With LTX
Key Takeaways
  • The enhancer is an optional Gemma 4 E2B rewrite pass that sits in front of the text encoder. On by default in the ComfyUI templates, enabled with --enhance-prompt in ltx-pipelines, and not available on the API.
  • Turn it on for short, rough, or ported-from-another-model prompts. Turn it off when your prompt already follows LTX's structure, when exact dialogue matters, and when debugging, so the only variable is text you wrote.
  • It can only expand what you give it. Supply a subject, a real verb, and a sound at minimum, and check multi-shot prompts by hand since cuts and character continuity are editorial calls.

The LTX-2.5 prompt enhancer is an optional rewrite pass: a Gemma 4 E2B language model expands your prompt, using a system prompt tuned for text-to-video or image-to-video, before the LTX-2.5 text encoder ever sees it. It is on by default in the official ComfyUI templates, it is off unless you ask for it in ltx-pipelines, and it does not apply to hosted API requests at all. Use it when your prompt is short, rough, or written for another model. Switch it off when you have already written a structured prompt and want the model to receive exactly those words.

That decision changes what the model conditions on, so make it on purpose.

What does the LTX prompt enhancer do?

The prompt enhancer rewrites text, it does not generate video. According to the prompting guide, it is "an LLM rewrite pass (the Gemma 4 E2B model)" that expands your input before generation runs. The LTX-2 repository ships separate system prompts for the two modes, gemma_t2v_system_prompt.txt for text-to-video and gemma_i2v_system_prompt.txt for image-to-video, and the ltx-core documentation states that these system prompts are also used to enhance user prompts.

Text encoder and prompt enhancer

Text encoder and prompt enhancer are two different Gemma 4 files that appear side by side in the LTX-2.5 ComfyUI templates, and they do different jobs. The text encoder, gemma4-12b-with-proj-ltx-2.5-bf16.safetensors, is Gemma 4 12B fine-tuned for LTX, and it converts the final prompt into conditioning for the model. It is required, and Google's stock Gemma 4 release is not a substitute: loading checks the encoder version. The prompt enhancer, gemma4_e2b_it_bf16.safetensors, is optional and sits in front of the encoder. The order is fixed: your prompt, then the enhancer (if enabled), then the text encoder, then generation.

How to find the LTX prompt enhancer

The prompt enhancer is a local, open-source feature, scoped by the prompting guide to "native ltx-pipelines and the official ComfyUI templates."

The ComfyUI Prompt Enhance node

In ComfyUI the enhancer model loads from ComfyUI/models/text_encoders/ and is driven by a dedicated Prompt Enhance node. The file is not in the LTX-2.5 Hugging Face repository; it is hosted in Comfy-Org/gemma-4, and the template's Download all button fetches it for you. The ComfyUI setup guide is explicit that the supplied templates enable prompt enhancement by default, so every first run you do from the LTX-2.5 text-to-video, image-to-video or first-frame/last-frame templates is already rewritten. Turn off Prompt Enhance to send your original text. New to the node graph? The ComfyUI workflow guide covers it.

The --enhance-prompt flag

The --enhance-prompt flag turns the rewrite on in ltx-pipelines from the command line, and the Python pipelines expose the same switch as an enhance_prompt parameter. A distilled run with enhancement looks like this:

bash

uv run python -m ltx_pipelines.distilled \
 --transformer-path models/ltx-2.5/diffusion_models/ltx-2.5-22b-distilled-transformer-bf16.safetensors \
 --text-encoder-path models/ltx-2.5/text_encoders/gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
 --video-vae-path models/ltx-2.5/vae/ltx-2.5-video-vae-bf16.safetensors \
 --audio-vae-path models/ltx-2.5/vae/ltx-2.5-audio-vae-bf16.safetensors \
 --spatial-upsampler-path models/ltx-2.5/latent_upscale_models/ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors \
 --prompt "A lighthouse keeper climbs a spiral staircase at night" \
 --enhance-prompt \
 --num-frames 121 \
 --seed 42 \
 --output-path output.mp4

Before you run it: the LTX-2.5 system requirements list an NVIDIA GPU with at least 32GB of VRAM, CUDA 12.7 or newer and Python 3.12 or newer, with an A100 80GB or H100 recommended. The LTX-2 repository is tested on CUDA 12.7 or newer, recommends 13 or newer, and targets 80GB or more of VRAM for full-precision runs, with distilled variants at 32GB using quantization. Run --help on the module to confirm the flags your version exposes.

Not for API requests

The LTX API does not take the enhancer flag. The prompting guide says it plainly: "For direct API requests, do not use --enhance-prompt." Through the LTX API, the words you send are the words the model conditions on.

When should you turn the prompt enhancer on?

The prompt enhancer earns its extra inference pass on inputs that lack structure. The prompting guide recommends it "when your prompt is short, rough, or was originally written for a different model." That covers two situations:

  • One-line ideas. "A fox crossing a snowy field at dawn" names a subject and a setting but says nothing about camera, action beats or sound. The guide's own structure asks for all of those, and the enhancer is a quick way to fill them in while you are exploring.
  • Prompts ported from other video models. The prompting guide warns that tag syntax and shot-list formatting written for other video models tend to underperform in LTX. Its fix is to rewrite into LTX's flowing-paragraph structure, or run the original through the enhancer.

When to switch it off

Switch the enhancer off when your prompt already follows the documented structure. The prompting guide says it "helps least when your prompt already follows the structure" it describes, and it adds latency because it runs an extra inference pass. Three practical cases also favor writing the final prompt yourself:

  • Exact dialogue. The prompting guide asks you to place spoken dialogue in quotation marks. A language-model rewrite may rephrase or reorder surrounding text, so when every word of a line matters, submit it as written.
  • Debugging a result. When you are isolating why a shot went wrong, fix the Stage 1 seed and turn the enhancer off, so the only thing changing between runs is text you wrote. The templates randomize the seed by default, and the seeds guide covers how to lock it.
  • Carefully paced prompts. The LTX-2.5 duration predictor sizes a clip to the action you describe when you leave the length unset, and times it as written rather than stretching it. An expanded prompt may describe more action than you intended, which can change the predicted length. If timing matters, write the beats yourself ("she pauses," "a beat of silence") or set an explicit frame count that satisfies the VAE constraint (F-1) % 8 == 0, for example 97 or 121 frames.

Input the enhancer can use

Enhancer input still benefits from the basics, because a rewrite can only expand what is there. The prompting guide lists six elements for a strong prompt: establish the shot, set the scene, describe the action, define the characters, identify camera movement, and describe the audio. Give it at least a subject, one verb that does something, and a sound:

A lighthouse keeper in a wool coat climbs a spiral staircase at night, lantern swinging. Wind howls outside. Low-angle shot, the camera tilts upward as she climbs.

Compare that with "lighthouse, night, moody," which leaves every creative decision to the rewrite. The first version fixes who, what happens, where the camera is and what we hear, so any expansion builds around choices you made. For the full structure, the LTX-2.5 prompt guide walks through each element with examples.

Does it change multi-shot prompts?

Multi-shot prompts are where writing by hand pays off most. LTX-2.5 can generate multi-shot scenes from one prompt, and the prompting guide asks you to name each transition in prose ("A hard cut transitions to..."), re-establish each new shot, reuse the same identifiers for recurring people, and state what the audio does at every cut. Those are editorial decisions. If you start a multi-shot sequence from a short idea, check that every cut is named and every recurring character keeps the same description before a final render.

Troubleshooting enhanced prompts

Enhanced prompts fail in a few recognizable ways, and each has a direct fix:

  • The template cannot find the enhancer file. Place gemma4_e2b_it_bf16.safetensors in ComfyUI/models/text_encoders/, downloaded from Comfy-Org/gemma-4, or use Download all from the Workflow Overview panel.
  • The output ignores a detail you care about. Turn Prompt Enhance off and put the detail in your own prompt. Keep lighting to one coherent logic per shot, which the prompting guide flags as a common source of confused results.
  • Your negative prompt was not expanded. In the audio-to-video workflow the negative prompt is never enhanced, only the positive one. The templates also apply a fixed negative prompt automatically, so check it before adding your own. The negative prompts guide covers how to write them.
  • API results feel thin. There is no enhancer on the API, so write the structured paragraph yourself. The common prompt mistakes guide lists what to fix first.

Summary

The LTX-2.5 prompt enhancer is an optional Gemma 4 E2B rewrite pass that expands a prompt with a text-to-video or image-to-video system prompt before the Gemma 4 12B text encoder converts it into conditioning. It runs only on local paths: the official ComfyUI templates, where Prompt Enhance is on by default, and ltx-pipelines, where you enable it with --enhance-prompt. Hosted API requests do not use it. Turn it on for short, rough or ported prompts. Turn it off for structured prompts, exact dialogue and debugging runs, and check every cut by hand in multi-shot scenes.

Ready to test it on your own prompts? Get started with LTX-2.5 and run the same idea with Prompt Enhance on and off.

Table of Contents: