demo: resume a part-watched clip, and cap the live canvas width - #1
Open
ymingxie wants to merge 2 commits into
Open
demo: resume a part-watched clip, and cap the live canvas width#1ymingxie wants to merge 2 commits into
ymingxie wants to merge 2 commits into
Conversation
The canvas was width:100% of the fluid right column, so on a 1080p screen it upscaled the 832x480 frames to about 1500px (1.8x). Cap it at 1248px, 1.5x native. Display only -- generation resolution still comes from --height and --width on the server. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Stopping half way and pressing Start again restarted the run at frame 0 while
still conditioning on the frame left on screen. The picture continued but the
bookkeeping did not: numbering went back to 0, the saved clip was dropped, the
force timeline was reset, and every Start was granted another full frame
budget, so the clip length cap could be walked past indefinitely.
Frames 0..N-1 are now the budget for the whole clip:
stopped part-way -> resume from the frame the viewer was on, carrying the
numbering, the saved clip and the force timeline, and
ending at the clip's last frame
watched to the end -> a new clip from frame 0, conditioned on the upload
The resume base is the DISPLAYED frame, not the generator's counter: generation
runs ahead of playback, so on Stop the server holds frames the browser never
showed. Those are dropped from the saved clip -- otherwise a save would replay
them and then jump back to the seam.
The pipeline numbers latents from 0 on every call while the browser reports
absolute frame indices, so a resumed segment offsets the force-change landing
frames by its start. Without that the readout reported a change landing behind
the viewer.
Verified against a headless viewer that paints on a 16 fps clock: stopping at
frame 81 of a 0..176 clip resumes at 82 and ends at 176; watching to 176 and
pressing Start again begins a new clip at frame 0.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two independent demo fixes, one commit each.
demo: resume a part-watched clip instead of restarting itStopping half way and pressing Start again restarted the run at frame 0 while still
conditioning on the frame left on screen. The picture continued but the bookkeeping did not:
numbering went back to 0, the saved clip was dropped, the force timeline was reset, and every
Start was granted another full frame budget — so the clip-length cap could be walked past
indefinitely by stopping and starting.
Frames
0..N-1are now the budget for the whole clip:Two details that are easy to get wrong:
ahead of playback, so on Stop the server holds frames the browser never showed. Those are
dropped from the saved clip — otherwise a save replays them and then jumps back to the seam.
from 0 on every call while the browser reports absolute frame indices; without the offset a
resumed segment reported changes landing behind the viewer.
Verification
Driven by a headless viewer that paints on a fixed 16 fps clock and reports
client_statstheway the browser does, against a 0..176 clip:
Server log at the seam:
[gen] continuing from frame 82 (viewer was on 81); 82 frames kept for saving.demo: cap the live canvas width instead of filling the columnThe canvas was
width: 100%of the fluid right column, so on a 1080p screen it upscaled the832x480 frames to ~1500px (1.8x). Capped at 1248px (1.5x native). Display only — generation
resolution still comes from
--height/--width.Not in this PR: the
~6 frames (0.4 s)force-change latency figure in the top-level README didnot reproduce here (measured 13–21 frames / 0.8–1.3 s, warm, at the shipped pacing defaults),
but that measurement is sensitive to the viewer's buffering and was made with a harness that
does not decode JPEG, so the README is left alone pending a real-browser check.
🤖 Generated with Claude Code