[PR #2023] [CLOSED] Video input: bounded preparation progress and cancellation follow-up #3814

Closed
opened 2026-11-07 15:30:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/2023
Author: @constantindjonkam
Created: 10/12/2026
Status: ❌ Closed

Base: main ← Head: feat/video-understanding-followup


📝 Commits (10+)

  • 97b61d4 strata-vision: ENCV encodes a video in the Qwen3-VL layout
  • b956145 serve: video parts (OpenAI video_url, Responses input_video, Anthropic video)
  • 8756ede web: attach a video in the chat page (button, drop), sent as a video_url part
  • f60bc4f docs: videos (the layout, the keys, measured encoding and answers)
  • b540110 strata-vision: a pair's time label is its frames' real mean (ffmpeg's fps filter returns frame k at ~(k+0.5)/fps)
  • e16bb3e serve: a video's frame pairs default to at most 768 tokens, qwen-vl-utils' VIDEO_MAX_TOKEN_NUM
  • 977d49e Fix video frontend conflict after cherry-pick
  • 4e9d2d1 serve: queue video preparation and expose progress state
  • b526001 strata-vision: report bounded video preparation progress
  • d215a24 serve: consume video progress and cancel preparation

📊 Changes

10 files changed (+998 additions, -61 deletions)

View changed files

📝 README.md (+2 -0)
📝 docs/DETAILS.md (+71 -2)
📝 serve/frontend.py (+32 -1)
📝 serve/responses.py (+6 -1)
📝 serve/server.py (+415 -47)
📝 serve/test_server.py (+202 -1)
📝 serve/web/app.css (+1 -0)
📝 serve/web/app.js (+42 -6)
📝 serve/web/sprite.svg (+1 -0)
📝 tools/vision/strata_vision.cpp (+226 -3)

📄 Description

Summary

Follow-up to #1609, based on v0.1.43. The six original #1609 commits are preserved as individual cherry-picks with their original authorship; this branch adds the serving/lifecycle work needed for long video preparation.

  • report bounded VPROG <frames_done> <frames_total> updates from strata-vision once per 64-frame batch;
  • poll encoder replies instead of blocking for the whole video, with validation and the existing timeout;
  • bound concurrent video preparation by the engine batch capacity and expose queue/preparation/progress state in /status and /metrics;
  • cancel queued and in-progress preparation when a client disconnects, kill/wait for the encoder, remove partial files, and restart the encoder on the next request;
  • propagate cancellation through Chat Completions, Responses, Anthropic, and MCP preparation paths;
  • show preparation stage and bounded progress in the web UI.

The follow-up does not combine the incompatible SVE2 video implementation from #1327.

Validation

  • clean isolated CUDA engine and vision builds under /tmp/strata-video-followup-build;
  • video/progress/cancellation tests, ClientHangUp, and the isolated Responses sampler test pass;
  • gguf_split_test and gguf_reader_test pass;
  • the combined serve.test_server serve.test_frontend serve.test_responses serve.test_parallel run covered 388 tests with one skip. The existing order-sensitive NoLeakedSampler.test_server_close_ends_the_sampler assertion passed in one run and failed in a later full-order rerun, but passes alone; it is unrelated to this video change;
  • live AP-Q5 CUDA smoke test on RTX 3090 + RTX 5080: OpenAI Chat Completions video returned HTTP 200, Responses input_video returned HTTP 200, /metrics observed preparing_video and VPROG 64/122, client-disconnect cancellation returned to idle, and the next video request succeeded after encoder restart. GPU 2's unrelated workload was not disturbed.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/2023 **Author:** [@constantindjonkam](https://github.com/constantindjonkam) **Created:** 10/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/video-understanding-followup` --- ### 📝 Commits (10+) - [`97b61d4`](https://github.com/Niko1221/Strata/commit/97b61d4507482242a33659c210fdd727fe0e3597) strata-vision: ENCV encodes a video in the Qwen3-VL layout - [`b956145`](https://github.com/Niko1221/Strata/commit/b9561457885ee2a00f675439a8f3b7fee5ec0cd9) serve: video parts (OpenAI video_url, Responses input_video, Anthropic video) - [`8756ede`](https://github.com/Niko1221/Strata/commit/8756ede46a98b092edaf47648fb2c26914c03e4e) web: attach a video in the chat page (button, drop), sent as a video_url part - [`f60bc4f`](https://github.com/Niko1221/Strata/commit/f60bc4fd04938330bdd85ad285347b51ee5f6060) docs: videos (the layout, the keys, measured encoding and answers) - [`b540110`](https://github.com/Niko1221/Strata/commit/b540110dd0a8d27059545aa8fa90d0a6077fb1a0) strata-vision: a pair's time label is its frames' real mean (ffmpeg's fps filter returns frame k at ~(k+0.5)/fps) - [`e16bb3e`](https://github.com/Niko1221/Strata/commit/e16bb3e7e36982debcff2a5c35e2b9f7892f97d4) serve: a video's frame pairs default to at most 768 tokens, qwen-vl-utils' VIDEO_MAX_TOKEN_NUM - [`977d49e`](https://github.com/Niko1221/Strata/commit/977d49e5ed027b8df56c56fe211e9f31b5f0ee99) Fix video frontend conflict after cherry-pick - [`4e9d2d1`](https://github.com/Niko1221/Strata/commit/4e9d2d10999f431187431b21748026989a01c45d) serve: queue video preparation and expose progress state - [`b526001`](https://github.com/Niko1221/Strata/commit/b526001a968a3af7d1c5ffdca800a1dab627b54d) strata-vision: report bounded video preparation progress - [`d215a24`](https://github.com/Niko1221/Strata/commit/d215a248cbe3b52daece74604f2b879951e40eb7) serve: consume video progress and cancel preparation ### 📊 Changes **10 files changed** (+998 additions, -61 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+2 -0) 📝 `docs/DETAILS.md` (+71 -2) 📝 `serve/frontend.py` (+32 -1) 📝 `serve/responses.py` (+6 -1) 📝 `serve/server.py` (+415 -47) 📝 `serve/test_server.py` (+202 -1) 📝 `serve/web/app.css` (+1 -0) 📝 `serve/web/app.js` (+42 -6) 📝 `serve/web/sprite.svg` (+1 -0) 📝 `tools/vision/strata_vision.cpp` (+226 -3) </details> ### 📄 Description ## Summary Follow-up to #1609, based on v0.1.43. The six original #1609 commits are preserved as individual cherry-picks with their original authorship; this branch adds the serving/lifecycle work needed for long video preparation. - report bounded `VPROG <frames_done> <frames_total>` updates from `strata-vision` once per 64-frame batch; - poll encoder replies instead of blocking for the whole video, with validation and the existing timeout; - bound concurrent video preparation by the engine batch capacity and expose queue/preparation/progress state in `/status` and `/metrics`; - cancel queued and in-progress preparation when a client disconnects, kill/wait for the encoder, remove partial files, and restart the encoder on the next request; - propagate cancellation through Chat Completions, Responses, Anthropic, and MCP preparation paths; - show preparation stage and bounded progress in the web UI. The follow-up does not combine the incompatible SVE2 video implementation from #1327. ## Validation - clean isolated CUDA engine and vision builds under `/tmp/strata-video-followup-build`; - video/progress/cancellation tests, `ClientHangUp`, and the isolated Responses sampler test pass; - `gguf_split_test` and `gguf_reader_test` pass; - the combined `serve.test_server serve.test_frontend serve.test_responses serve.test_parallel` run covered 388 tests with one skip. The existing order-sensitive `NoLeakedSampler.test_server_close_ends_the_sampler` assertion passed in one run and failed in a later full-order rerun, but passes alone; it is unrelated to this video change; - live AP-Q5 CUDA smoke test on RTX 3090 + RTX 5080: OpenAI Chat Completions video returned HTTP 200, Responses `input_video` returned HTTP 200, `/metrics` observed `preparing_video` and `VPROG 64/122`, client-disconnect cancellation returned to idle, and the next video request succeeded after encoder restart. GPU 2's unrelated workload was not disturbed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:30:57 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3814
No description provided.