Forward reference video generation to Python workers - #5698
Merged
Conversation
This was referenced Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference-capable Python workers can now receive every image and video reference from the existing ReferenceToVideo workflow and storyboard provider path. PythonProvider forwards the typed input object, model ID, generation options, secrets, and cancellation signal through the new
provider.reference_to_videobridge operation.The bridge preserves input order, rejects malformed or empty binary entries, and rejects combined media above 192 MiB before sending a frame. Results reuse the existing chunked video transfer and progress/cancellation paths. Worker capability discovery gates both the provider method and model tasks, so older workers do not expose reference generation. Native worker
supported_tasksis normalized at the boundary, and forced calls to start-frame-only models fail before submission. Protocol version advances to 6 without raising its compatibility floor.Companion changes:
Validation: runtime build and 110 focused bridge/provider tests passed, as did root typecheck, lint, and all five selected harness selfchecks. A real TypeScript bridge → Python worker → combined WanGP adapter integration passed ordered image-only, video-only, two-video and mixed requests, soundtrack on/off, progress, chunked output, and temporary-file cleanup. A separate subprocess integration verified cancellation and adapter termination. The WanGP session was simulated rather than running a GPU model.
npm run test:affectedis not green: the unchanged Next.js examples pull@openclaw/fs-safethrough existing runtime/node barrels, and Turbopack cannot bundle its native module. The failure persisted after reinstalling dependencies. A correct Cloudflare fix requires a separate change to the imports used by Workers; no checks were disabled and no unrelated example changes are included here.