Skip to content

global_sink: false causes permanent KV cache corruption #20

@ki-lw

Description

@ki-lw

In the file interactive_causal_inference.py line 37-41, the code explicitly sets cache["k"].zero_(). This operation zeroes out the KV cache, including the sink tokens.

However, during cache updates (see line 260 in causal_model.py), the is_recompute logic is designed to protect the sink region from being overwritten. Because the sink portion of the cache has already been zeroed out, it will never be updated again, resulting in the sink KV cache remaining permanently zero throughout subsequent video generation.

This behavior effectively causes a persistent corruption of the KV cache when global_sink: false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions