Archived
video: endpoint keyframe completion (I2VA / L2VA / FL2VA)
One keyframe path serves three DaSiWa modes: first_frame pins output frame 0,
last_frame pins the last frame, and the gap is diffused. A keyframe is pure
attention conditioning -- its VAE latent rides as a pinned (update=0) cond row
at its frame's time position, faithful to comfy/ldm/minimax/model.py where
keyframe latents are img_update==False rows. The sampler is untouched; the step
merely widens to carry the extra cond rows.
- server (videos.cpp/iface.h/adapters.h): first_frame/last_frame form parts ->
VideoRefMedia::FIRST_FRAME/LAST_FRAME; kf_task validation (i2va/fl2va need
first, l2va/fl2va need last); keyframes are mutually exclusive with refs;
encoder_image_canvas(cover=LAST) sizes the anchor.
- driver (video_driver.cpp): keyframe pass issues a RAD_ENC_IMAGE Vencode per
anchor (slot = ++ref_tab[1], ordered), appends ref_tab key triples
{frame(0|frames-1), video_t=1, audio_t=0}.
- arch (minimaxh3.cpp): ref_parts emits keyframe cond parts FIRST; the step
scatter admits kR2VCond/kR2VCondAudio rows.
- tests: video_gen_test keyframe-completes-widens-the-step-and-pins-the-ends
(2x Vencode at slot 1,2; widened step; seg_cu/lat_cu/ref_tab pinned); fake_pack_ref
lays keyframe rows (nk=0 byte-identical to before); videos_test keyframe API.
Device-verified (TP2, seed 9999): FL2VA completes a valid 73-frame MP4+AAC; pins
are consumed (fl2va != same-seed t2va) and force the endpoints (frame0 vs anchor
0.687 pinned vs 0.460 un-pinned; last 0.719 vs 0.521). Fidelity follow-up (not
function): anchors ride as pins only; the reference also feeds them through the
TE as vision tokens, so a prompt that contradicts the anchor lets text win --
full endpoint parity vs a golden needs TE-anchor tokens (#10/P6 bucket).
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
8ddcbbf01f
commit
60e920cd4d
11 files changed
+410
-37
No files matched your search
@@ -719,6 +719,15 @@ public:
|
||||
return p_->encoder_image(bytes, n, ratio, max_side, out, why);
|
||||
}
|
||||
|
||||
int encoder_image_canvas(const uint8_t* bytes, size_t n, int32_t w, int32_t h, bool cover,
|
||||
mm::Frame* out, std::string* why) override {
|
||||
if (!p_ || !mm::decoder_available()) {
|
||||
if (why) *why = "no picture decoder is available";
|
||||
return RAD_E_UNSUPPORTED;
|
||||
}
|
||||
return p_->encoder_image_canvas(bytes, n, w, h, cover, out, why);
|
||||
}
|
||||
|
||||
int encoder_video(const uint8_t* bytes, size_t n, int32_t ratio, int32_t max_side,
|
||||
int32_t max_frames, std::vector<mm::Frame>* out, std::string* why) override {
|
||||
if (!p_ || !mm::decoder_available()) {
|
||||
|
||||
Reference in new issue
Block a user