Skip to content

Demo server may reuse KV cache across tasks, causing cross-session state leakage #8

Description

@dhhdjsmsl

Hi, thanks for open-sourcing SoulX-LiveAct.

While reading demo.py, I noticed that the demo service creates a single long-lived DistributedVideoEngine instance and processes multiple tasks with the same engine. At the same time, self.kv_cache is initialized in __init__ and then reused inside generate_and_push() for inference.

I could not find a per-task KV-cache reset/reinitialization path before starting a new request. Since this is a streaming / memory-cached generation pipeline, it seems possible that history from the previous task may leak into the next task, especially when the server handles multiple sequential requests with different images/audio.

Why this matters:

  • possible cross-session contamination
  • less reproducible outputs across consecutive runs
  • harder debugging when the first task behaves differently from later tasks
  • potential long-running stability issues for the GUI demo server

If I missed an existing reset path, please let me know.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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