Tiled Self-Attention
We partition the query tokens into M non-overlapping tiles {Tm}Mm=1, with each tile covering the same spatial region across every video frame. If Im contains the token indices assigned to tile m, its queries are:
Qm = Q[Im, :]
Each query tile attends to the complete set of keys and values from the video. Tiling therefore reduces the query-side working set without restricting global context:
Om = Softmax(Q̃m(K̃all(m))T√dh) Vall
Here, Q̃m and K̃all(m) are the positionally encoded queries and global keys, Vall contains every value token, and dh is the attention-head dimension. With standard RoPE, processing the query tiles independently and concatenating their outputs is mathematically equivalent to conventional global self-attention. The tile outputs are scattered back to their original locations as O[Im, :] = Om. CineScale changes only how the global keys are positionally encoded for each tile.
Adaptively Rectified RoPE
At high resolutions, standard RoPE encounters relative spatial offsets far outside its training distribution. For every query tile, Adaptively Rectified RoPE leaves nearby key coordinates unchanged and linearly compresses more distant coordinates toward the tile.
Consider a vertical key coordinate py in [0, Ly - 1]. Let [ℓy(m), uy(m)] be the vertical extent of tile m, Dy(m) = uy(m) - ℓy(m) its height, and Ry the largest relative offset supported by the pretrained model. The remaining external positional budget is:
By(m) = Ry - Dy(m)
Given a local preservation threshold τy, the unchanged margins on either side of the tile are:
δy,-(m) = min(τy, ℓy(m), By(m)),
δy,+(m) = min(τy, Ly - 1 - uy(m), By(m))
These margins define the interval [κy,-(m), κy,+(m)] whose coordinates remain unchanged:
κy,-(m) = ℓy(m) - δy,-(m),
κy,+(m) = uy(m) + δy,+(m)
Coordinates outside that interval are compressed toward the target endpoints γy,-(m) and γy,+(m):
γy,-(m) = max(0, uy(m) - Ry),
γy,+(m) = min(Ly - 1, ℓy(m) + Ry)
The corresponding compression slopes are:
λy,-(m) = κy,-(m) - γy,-(m)κy,-(m),
λy,+(m) = γy,+(m) - κy,+(m)Ly - 1 - κy,+(m)
With every term now defined, the vertical coordinate mapping is:
ρy(m)(py) =
{
γy,-(m) + λy,-(m)py,
if py < κy,-(m)
py,
if κy,-(m) ≤ py ≤ κy,+(m)
κy,+(m) + λy,+(m)(py - κy,+(m)),
if py > κy,+(m)
The same mapping is applied along the horizontal axis. Query features and their original temporal-spatial coordinates remain unchanged; only the coordinates assigned to keys are rectified relative to the current query tile:
Q̃m = RoPE(t, y, x) Qm
K̃all(m) = RoPE(t, ρy(m)(y), ρx(m)(x)) Kall
This tile-conditioned encoding preserves local spatial relationships while bounding long-range relative offsets, allowing stable global interactions and coherent detail at resolutions up to 4K.