Simplify H3 beat timing and cleanup

This commit is contained in:
2026-09-03 08:56:43 +00:00
parent 769257513b
commit e098e44bf1
4 changed files with 105 additions and 167 deletions
+14 -58
View File
@@ -10,7 +10,7 @@ The node does two jobs at once:
Think of it like this:
- `prompt` decides what happens.
- `shot_seconds`, `per_beat_length`, and beat-level `seconds:` decide how long each beat is allowed to be.
- `shot_seconds` and beat-level `seconds:` decide how long each beat is allowed to be.
- `first_frame` and the handoff system decide continuity.
- `ref_1` to `ref_9` decide identity and location reference conditioning.
@@ -375,60 +375,38 @@ This is the most important group to understand.
These settings work together:
- `shot_seconds`
- `per_beat_length`
- beat-level `seconds:` or `duration:`
- `allow_oversize_shots`
- `megapixels`
- `vram_headroom_gb`
- `allow_res_backoff`
### The Short Version
`shot_seconds` is a ceiling, not a promise.
`shot_seconds` is the socket-defined maximum.
A beat-level `seconds:` line is a request, not absolute law.
A beat-level `seconds:` line wins for that beat.
The final beat length is limited by:
- H3's hard single-shot max
- the VRAM budget
- the current resolution and pixel budget
If a requested length is too much for the hardware, the node keeps it and lets the render fail instead of quietly shrinking it.
### Exact Decision Order
For each beat, the node decides length like this:
1. If the beat has `seconds:` or `duration:`, use that as the requested length.
2. Otherwise, if `per_beat_length` is on, estimate the beat length from its content.
3. Otherwise, use the global shot ceiling.
4. Clamp that result to the global `shot_seconds` ceiling if one is set.
5. Clamp again if H3 or VRAM will not allow that size.
6. Snap the result to H3's frame grid.
2. Otherwise, estimate the beat length from its content.
3. Snap the result to H3's frame grid.
### `shot_seconds`
Global per-shot ceiling.
Global per-shot maximum.
Important:
- This does not mean every beat will be exactly this long.
- It means no beat is allowed to be longer than this, unless other limits clamp it first.
- It means beats are sized against this socket value when the node needs a maximum.
If left unconnected or set to `0`, the node uses the largest safe shot length it can budget automatically.
### `per_beat_length`
When on, the node estimates beat length from the beat content if there is no explicit beat-level `seconds:` line.
That means:
- short simple beats become shorter shots
- more complex beats become longer shots
When off:
- every beat uses the full global ceiling unless that beat has its own explicit `seconds:` line
### Beat-Level `seconds:` Or `duration:`
Inside a beat, you can write:
@@ -445,29 +423,7 @@ duration: 8
This has the highest priority for that beat.
But it can still be clamped down if:
- it exceeds the global `shot_seconds` ceiling
- it exceeds H3's hard max shot length
- it exceeds the VRAM budget and `allow_oversize_shots` is off
### `allow_oversize_shots`
This only affects forced global `shot_seconds`.
When off:
- too-long requests are clamped down to what fits
When on:
- the node will try to honor the requested global ceiling even if it exceeds the safe VRAM budget
Trade-off:
- slower renders
- possible spill to system RAM
- possible OOM
It is not silently shortened by the node. If you ask for more than your hardware can handle, the render can fail.
This does not bypass H3's hard max shot size.
@@ -1287,9 +1243,9 @@ Useful on tighter cards at larger resolutions.
### `cleanup_between_shots`
Moves completed shot data off the GPU and clears memory between beats.
The node always moves completed shot data off the GPU and clears memory between beats.
Good default for long chains.
This is hard-coded for long-chain stability.
### `upscale`
@@ -1313,7 +1269,7 @@ Use them in this order:
1. Get the render stable.
2. If decode fails, use decode tiling.
3. If shot length is too short, reduce pixel cost before forcing oversize.
3. If shot length is too short, reduce pixel cost before forcing a longer shot.
4. Only upscale after the base render is working.
## Group 10: Overlay Controls
@@ -1408,7 +1364,7 @@ Recommended pattern:
- one character ref in `ref_1`
- `ref_mode = auto ref2v`
- no explicit `<Picture 1>` tags needed
- `per_beat_length = on`
- put `seconds:` on a beat when you want a specific length
### Two Characters Plus One Location
@@ -1422,7 +1378,7 @@ Recommended pattern:
- use `shot_seconds` as a safe ceiling
- put `seconds:` inside beats that need exact control
- check `plan_only` first
- expect clamping if you ask for more than H3 or VRAM allows
- expect an OOM if you ask for more than H3 or your hardware allows
## Best Way To Check What Will Really Happen