Text-to-video diffusion models have enabled open-ended video synthesis, but often struggle with generating the correct number of objects specified in a prompt. We introduce NUMINA , a training-free identify-then-guide framework for improved numerical alignment. NUMINA identifies prompt-layout inconsistencies by selecting discriminative self- and cross-attention heads to derive a countable latent layout. It then refines this layout conservatively and modulates cross-attention to guide regeneration. On the introduced CountBench, NUMINA improves counting accuracy by up to 7.4% on Wan2.1-1.3B, and by 4.9% and 5.5% on 5B and 14B models, respectively. Furthermore, CLIP alignment is improved while maintaining temporal consistency. These results demonstrate that structural guidance complements seed search and prompt enhancement, offering a practical path toward count-accurate text-to-video diffusion. The code is available at https://github.com/H-EmbodVis/NUMINA.
Figures & tables
Figure 1: We present NUMINA , a training-free framework that alleviates the misalignment between precise numerals and visual instances in text-to-video diffusion models. We significantly improve counting accuracy while maintaining natural layouts and temporal coherence.
Figure 2: Visualization of the cross-attention maps corresponding to different texts in the prompt. The highlighted areas represent a stronger level of attention between the pixels and the text.
Figure 3: The pipeline of our NUMINA follows a two-phase paradigm. Given a text prompt containing numerals, we first perform the numerical misalignment identification to extract explicitly countable layouts from attention maps. Based on the layout, we further conduct a refinement and a layout-guided generation for the numerically aligned video generation.
Figure 4: The PCA visualization of self-attention maps for Wan2.1-1.3B. (a) Different attention heads naturally capture diverse spatial patterns. (b) We select the head with the highest instance separability for countable layout construction.
Models
CountAcc (%)
TC (%)
CLIP Score
Wan2.1-1.3B [ 59 ] (81 frames, 832 × 480)
Wan2.1-1.3B
42.3
81.2
33.9
+ Seed search
45.5( +3.2 )
82.3( +1.1 )
34.6( +0.7 )
+ Prompt enhancement
47.2( +4.9 )
82.1( +0.9 )
33.7( -0.2 )
+ NUMINA ( ours )
49.7 ( +7.4 )
83.4 ( +2.2 )
35.6 ( +1.7 )
Wan2.2-5B [ 59 ] (81 frames, 1280 × 704)
Table 1: Comparison of NUMINA with other practical strategies. We report Counting Accuracy (CountAcc), Temporal Consistency (TC), and CLIP Score on Wan [ 59 ] of varying scales.
Figure 5: Qualitative comparison of NUMINA with the most advanced commercial models.
Figure 6: The per-numeral accuracies for Wan2.1-1.3B.
Figure 7: Ablation on the reference timesteps t⋆ for head selection.
Method
CountAcc (%)
TC (%)
Baseline
42.3
81.2
GroundingDINO
47.5( +5.2 )
82.8( +1.6 )
Attention ( ours )
49.7 ( +7.4 )
83.4 ( +2.2 )
Table 2: Ablation on the layout construction method.
Co
Cc
Ct
CountAcc (%)
TC (%)
Baseline
42.3
81.2
✓
45.1( +2.8 )
82.1( +0.9 )
✓
✓
46.9( +4.6 )
82.3( +1.1 )
✓
✓
48.9( +6.6 )
83.1( +1.9 )
✓
✓
✓
49.7 ( +7.4 )
83.4 ( +2.2 )
Table 3: Ablation on the components of the layout refinement cost.
Method
CountAcc (%)
TC (%)
Baseline
42.3
81.2
Random
44.1( +1.8 )
82.6( +1.4 )
All average
43.0( +0.7 )
82.4( +1.2 )
Top-3
48.2( +5.9 )
82.5( +1.3 )
Top-2
49.4( +7.1 )
83.3( +2.1 )
Top-1
49.7 ( +7.4 )
83.4 ( +2.2 )
Table 4: Ablation on the self-attention head selection strategy.