Archived
minimaxh3: one canvas-sized frame must fit every encoder level; keyframes ride any legal output size
A one-frame media -- a reference picture, or an endpoint keyframe -- never shrinks through the temporal downsamplers (1->1->1->1 against a full clip's 17->17->9->5), so it rides every level alone, and a keyframe must ride the TARGET canvas: it is resized to the output resolution before the VAE and its latent rows share the target grid. The deep level buffers only held a full clip's shrunken temporal volume, which capped a single frame at 5*256^2 (~572-sided) -- 480x736 was refused, 544x736 had died the server with 'venc.l3.in 6256>5120' before cont.36 added the accept-time 400. declare_venc now sizes each level's rows as max(full clip, kEncOneFrames) frames at the tile side, kEncOneFrames = ceil(1344*768 / 256^2) = 16, so a single frame is bounded only by the model's whole canvas (16*256^2 >= max_area); venc_geom applies the same max() per volume. Multi-frame media are unchanged (the pixels volume still forces sides <= 256). Levels 2-5 grow (R 36864->65536, 5120->16384, 1280->4096, 192->1024): about +150 MB arena, plugin-only -- no kernel, ABI, or container change; the driver's accept-time check delegates to the plugin export and follows automatically.
This commit is contained in:
1 parent
6dad488dbe
commit
f7c349075c
2 files changed
+45
-30
No files matched your search
@@ -517,10 +517,11 @@ int VideoDriver::shape_job(Job& j, const VideoRequest& r, int32_t chunks, int32_
|
||||
};
|
||||
/* A picture or an endpoint keyframe folds through the VAE as a ONE-frame clip, which is
|
||||
* why it rides at a far larger side than a video can -- but "larger" is not "unbounded":
|
||||
* the encoder's per-level buffers hold a full clip's worth of the DEEPEST temporal stage,
|
||||
* so one frame cannot exceed a fifth of the pixels budget no matter how few frames it
|
||||
* has. The geometry call answers that; asking it here refuses an over-cap media at
|
||||
* accept, where a step-time refusal would stop the whole engine. */
|
||||
* a one-frame clip never shrinks through the temporal downsamplers, so it must fit at
|
||||
* every level ALONE; the buffers hold max(a full clip, one canvas-sized frame), leaving
|
||||
* the model's whole canvas as a single frame's ceiling. The geometry call answers that;
|
||||
* asking it here refuses an over-cap media at accept, where a step-time refusal would
|
||||
* stop the whole engine. */
|
||||
auto one_frame = [&](const VideoRefMedia& m) {
|
||||
const int64_t in[4] = { 1, m.enc_h, m.enc_w, 3 };
|
||||
return !enc_geom_ || enc_geom_(RAD_GEN_PASS_VENCODE, in, eg, 25) >= 0;
|
||||
|
||||
Reference in new issue
Block a user