Refactor README and streaming_turn_model.py to clarify fixed-grid frame ownership and update documentation. Remove merge conflict markers and enhance explanations regarding session launching conditions and audio slicing behavior.

This commit is contained in:
Xin Wang
2026-08-17 22:59:02 +08:00
parent a6dea1529a
commit d815b59def
2 changed files with 0 additions and 16 deletions
-6
View File
@@ -584,17 +584,11 @@ python streaming_turn_model.py \
--output features/Session_1_first_4s_check.pt --output features/Session_1_first_4s_check.pt
``` ```
<<<<<<< HEAD
Do not launch all sessions unless `cache_replay` cosine is nearly 1. For Do not launch all sessions unless `cache_replay` cosine is nearly 1. For
`open-stream-replay`, a materially lower `continuous_window_semantics` cosine `open-stream-replay`, a materially lower `continuous_window_semantics` cosine
means that the custom payload stitching is not equivalent to one continuous means that the custom payload stitching is not equivalent to one continuous
Qwen input; it must not be dismissed as a media-turn-boundary effect because Qwen input; it must not be dismissed as a media-turn-boundary effect because
this mode intentionally keeps a single media turn open. this mode intentionally keeps a single media turn open.
=======
Do not launch all sessions unless `cache_replay` cosine is nearly 1. The
`continuous_window_semantics` cosine answers a different question and may be
lower because blockwise media preprocessing changes the representation.
>>>>>>> 8145be410866dd0675038d92347aea34d24b84d5
Video can be sampled at 2 FPS while predictions remain at 5 Hz. Audio and the Video can be sampled at 2 FPS while predictions remain at 5 Hz. Audio and the
causal boundary update every 200 ms; consecutive prediction times may use the causal boundary update every 200 ms; consecutive prediction times may use the
-10
View File
@@ -243,7 +243,6 @@ class FixedGridAV:
raise RuntimeError(f"Decoded audio is empty: {self.path}") raise RuntimeError(f"Decoded audio is empty: {self.path}")
def frames(self, start: float, end: float) -> list[Any]: def frames(self, start: float, end: float) -> list[Any]:
<<<<<<< HEAD
"""Return fixed-grid frames whose timestamps lie in ``[start, end)``. """Return fixed-grid frames whose timestamps lie in ``[start, end)``.
Half-open ownership is essential at native block boundaries. For Half-open ownership is essential at native block boundaries. For
@@ -251,23 +250,14 @@ class FixedGridAV:
not also be committed in ``[0.0, 2.0)``. Audio slicing below follows not also be committed in ``[0.0, 2.0)``. Audio slicing below follows
the same convention. the same convention.
""" """
=======
"""Return fixed-grid frames whose timestamps lie in [start, end)."""
>>>>>>> 8145be410866dd0675038d92347aea34d24b84d5
import numpy as np import numpy as np
from PIL import Image from PIL import Image
first = max(0, int(math.ceil(start * self.fps - 1e-7))) first = max(0, int(math.ceil(start * self.fps - 1e-7)))
<<<<<<< HEAD
last = min(
self.num_frames - 1,
int(math.ceil(end * self.fps - 1e-7)) - 1,
=======
last_exclusive = min( last_exclusive = min(
self.num_frames, self.num_frames,
int(math.ceil(end * self.fps - 1e-7)), int(math.ceil(end * self.fps - 1e-7)),
>>>>>>> 8145be410866dd0675038d92347aea34d24b84d5
) )
last = last_exclusive - 1 last = last_exclusive - 1
if first > last: if first > last: