Repository navigation
Videos with sound start from a picture and can end on a second one - #316
Conversation
draw-api h3video_generate takes image_b64 and last_image_b64 (aifarm-draw #53). Both video tools take file_ids; without them the pictures of the current message and its quote are used. One picture is the first frame, two are the first and the last. Only a video with sound keeps them: FastFrames renders from text alone. The video worker downloads each picture at up to 1280 px and describes it with the vision model. The MiniMax-H3 optimizer gets the descriptions as "Picture 1, the first frame: ..." lines and writes the I2VA or FL2VA body that starts from <Picture 1> (draw-api adds the alignment line). A picture sets the frame unless the user asked for one. A picture that cannot be loaded or described leaves a video from text instead of a failure.
|
Danger warning: PR-Agent failed on HTTP 429 from the GLM Coding Plan endpoint before publishing anything (run 47156313723), as on #315. |
Three pictures in a message or an album should not block the video, least of all a GIF that ignores them; only file_ids that name more than two are refused.
|
PR-Agent failed on HTTP 429 from the GLM Coding Plan endpoint on both heads (runs 47156313723 attempts 1–2 and the 91622b4 run) and published nothing. The owner approved merging without it. My own review of the diff found one issue, fixed in 91622b4: a third picture in a message or an album no longer refuses the video; only |
A VIP video with sound can now start from a chat picture and end on a second one: one picture is the first frame, two are the first and the last frame. The farm side is aifarm-draw #53 (
image_b64andlast_image_b64onh3video_generate, releaseWaveCut/pi-H3-OrbitQuant-W4A8@4a4b503e).Changes
Picking the pictures.
make_videoandmake_movietakefile_ids(asdraw_imagedoes). Without them the pictures of the current message, its media group and its quote are used. More than two pictures are refused withmake_*_frames_invalid. The scheduler keeps the pictures only for a video with sound; FastFrames renders from text alone, so a GIF or a user without VIP gets the clip from the text. The job meta stores them asframes: [{file_id, file_unique_id}].Rendering. The video worker downloads each picture at up to 1280 px (
TelegramClientVisionDataUrlProvider) and describes it with the dialog's media describer. A picture that cannot be loaded or described drops the pictures and makes the video from text instead of failing. draw-api getsimage_b64andlast_image_b64. A picture sets the frame unless the user asked for one: only an explicitorientationis sent; the optimizer's guess is not.Prompt. The MiniMax-H3 optimizer gets
Picture 1, the first frame: …andPicture 2, the last frame: …lines in the user message and a new "Pictures" section with an I2VA example, following MiniMax'sVIDEO_PROMPT_WRITING_GUIDE_base_en.md(sections 2.1 and 3.1–3.3). One picture: the shot starts from<Picture 1>and first establishes what it shows. Two pictures: one continuous shot from Picture 1 to Picture 2. The optimizer does not write the alignment line; draw-api adds it. The dialog system prompt sends requests to animate a picture tomake_movie, and/starthelp explains it.Prompt contract
video/movie_optimizer.promptkeeps its role markers; its template data gainspictures(a list of lines), rendered only in the user message, so the system part stays the same for every request.aifarm/system.promptgains one sentence.Verification
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings: clean.cargo testfor dialog, media, taskman, llm, prompts and app: all pass.file_idsin their order, and more than two refused; pictures kept only for a video with sound; first and last frame and the descriptions down to the draw-api body; a picture sets the frame; an unloadable picture leaves a video from text; silent clips ignore pictures; picture lines in the optimizer's user message.