Original Title: Will It Render? Learned Attention Steering for Object Presence in Text-to-Video
AttnSteer reads the cross-attention to a specific object word in the prompt at a certain denoising step of a text-to-video model, predicting whether that object will ultimately appear in the video. It has only 37k parameters and is trained using the generative model's own sampling trajectories and automatic detector labels; at inference time, the prediction is treated as a differentiable objective and backpropagated to the current latent variables, causing missing objects to appear. It can also be used in reverse to suppress objects or control which frames they appear in.
Why It Matters When prompts contain many objects, text-to-video models often miss drawing them. This method does not require retraining the generative model; the authors report improved all-object presence rates on LTX-2, Wan, and CogVideoX.
Likes 4 · Code Stars 4
Reasons
- The paper reports the proportion of videos where "all objects appear": LTX-2 improved from 51.1% to 75.5%, Wan2.1 from 40.4% to 59.9%, and CogVideoX from 56.1% to 65.9%; temporal specificity improved from 35.7% to 52.6%, with comparable video quality.
- The code and probe weights on Hugging Face are MIT licensed; the repository also provides a test set of 473 prompts and an object presence evaluation metric usable for videos from any model.
- Code stars 4 only reflect attention level.
Usage
- Run pip install torch==2.9.1 (from the cu128 source) followed by pip install -e .; check out the LTX-2 or Wan2.1 source code at the commit specified in the README, and set VP_LTX_ROOT / VP_WAN_ROOT; CogVideoX uses diffusers 0.39 directly.
- Run bundle=$(python -m scripts.download_artifacts --backbone wan --quiet) to download the probes, then run wir-run --bundle "$bundle" --prompt "a kite and a baseball bat" --target-words "kite,baseball bat".
- Use --target-words to specify the object words to recover; if omitted, guidance is applied to all nouns in the prompt.
Risks
- A separate probe must be trained for each denoising step of each generative model; currently, only three sets are available for LTX-2, Wan2.1-T2V-1.3B, and CogVideoX-5B, so it cannot be directly applied to other models.
- Inference requires backpropagation through latent variables, making it slower than standard generation; the README homepage does not specify the additional latency.
- Only command-line scripts are provided, with no ComfyUI nodes; the LTX-2 backend requires the 22B distilled model and the Gemma-3-12B text encoder.