Skip to content

Match browser duration rounding to the Python frame grid - #60

Draft
ethanfel wants to merge 1 commit into
nightlyfrom
sceneweaver-plan-timing
Draft

ethanfel wants to merge 1 commit into
nightlyfrom
sceneweaver-plan-timing

Conversation

@ethanfel

Copy link
Copy Markdown
Owner

The browser could round requested durations down because JavaScript remainder can be negative. For example, 1 second became 22 frames in Studio while the Python compiler generated 39. Seconds-to-exact-frame conversion could therefore shorten a scene, and requests just beyond the maximum duration could be accepted incorrectly.

Normalize the browser remainder before adding padding and refresh the Plan core import cache keys. Existing exact-frame inputs and Python compilation are unchanged.

Validation:

  • Compared 7,829 durations against the actual Python helper, including fractional-frame requests, floating-point boundaries and maximum-length rejection.
  • Compared six compiled Plans with browser raw/delivered timing and checked seconds-to-frame conversion; no project files were written.
  • Existing Plan editor, Studio, scene-duplication and chapter-resolution JavaScript regressions passed.

The tests use CPU-only native helpers with ComfyUI import stubs. No production project or GPU execution was used.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant