[Partner Nodes] feat(ByteDance): declare Seedance 2.5 omni task type (video extension) - #15577
[Partner Nodes] feat(ByteDance): declare Seedance 2.5 omni task type (video extension)#15577purzbeats wants to merge 1 commit into
Conversation
Seedance 2.5 folds three jobs into one endpoint: reference-to-video, video editing, and video extension. We never sent omni_reference_task_type, so every job ran as "auto" and the model inferred the job from the prompt. Extension was reachable that way but not usable: ratio defaults to 16:9 and an extend requires "adaptive", and we only coerced to adaptive for edits, so the default extend run violated the constraint and failed asynchronously after the reference upload and the queue wait. Replace the video_editing boolean with a task_type combo mapped onto omni_reference_task_type, and drive the coercion from it. An edit inherits the source clip's aspect ratio and length; an extension inherits the aspect ratio but keeps the requested duration, which is the only constraint separating the two. Also: - reject edit/extend with no reference video before the upload runs, rather than paying for the upload and a round trip first - tailor the TaskTypeConstraint error to the selected task type, and handle TaskTypeMismatch, which was previously unhandled - offer mov output, the provider's recommendation for edit and extend - rename the price badge's widget dependency and its JSONata together, since missing either leaves the badge silently stale The field is 2.5 only. Seedance 2.0 has no task_type widget, falls through to "auto", and the field is omitted from its requests. The text-to-video and first/last-frame nodes share the request builder and are unaffected. Cloud needs no change: the BytePlus proxy forwards the raw request body and has no OpenAPI validator on the route, so the new field passes through untouched.
|
🎉 Thank you for your contribution, we really appreciate it! 🎉 Like many open source projects, we require contributors to sign our Contributor License Agreement (CLA). A CLA makes the ownership of contributions explicit, so contributors and the project share a clear understanding of how the code can be used. By signing, you:
CLAs are standard practice across major open source projects including those under the Apache Software Foundation and the Linux Foundation. Ours is based on the Apache Software Foundation's CLA. Most importantly, it would enable us to relicense the project under a more permissive license in the future, giving the project and its community greater flexibility. ✍ To sign, please post a new comment on this PR with exactly the following text: ✍ I have read and agree to the Contributor License Agreement You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
|
Closing in favour of #15579, which carries this change forward from @bigcat88. That PR is based on this one and is the version to review and merge. Everything here is superseded, including the follow-ups noted above ( Thanks @bigcat88 for picking it up. |
Warning
Draft, not ready to merge. This was written with Claude Code and needs a real
developer to review it properly before it goes anywhere near
master. It is openedas a starting point for @bigcat88, not as finished work. The design decisions below
are proposals, and at least one of them (the widget rename) has a known migration
cost that someone should weigh in on.
What this does
Seedance 2.5 folds three jobs into one omni endpoint: reference-to-video, video editing,
and video extension. We never sent
omni_reference_task_type, so every job ran asautoand the model inferred the job from the prompt.
Extension was reachable that way but not usable.
ratiodefaults to16:9, an extendrequires
adaptive, and we only coerced to adaptive for edits. So the default extend runviolated the constraint and failed asynchronously, after the reference upload and the
queue wait.
This replaces the
video_editingboolean with atask_typecombo mapped ontoomni_reference_task_type, and drives the ratio and duration coercion from it:task_typeratiodurationautoreferencereferenceeditadaptive-1editextendadaptiveextendThat last row is the point. An edit inherits the source clip's aspect ratio and length;
an extension inherits the aspect ratio but keeps the requested duration. Per the vendor
docs that duration behaviour is the only constraint separating the two subtasks.
Also in here:
edit/extendwith no reference video before the virtual-library uploadruns, instead of paying for the upload and a round trip to find out.
TaskTypeConstrainterror to the selected task type. The old text alwaystold the user to enable
video_editing, which for an extend is the opposite of the fix,since it pins duration to
-1and discards the length they asked for.TaskTypeMismatch, which was previously unhandled and surfaced raw.movoutput, the provider's recommendation for edit and extend.Missing either one leaves the badge silently stale, with no error and no test.
Scope notes
omni_reference_task_typeis a 2.5-only field. Seedance 2.0 has notask_typewidget,falls through to
auto, and the field is omitted from its requests entirely.The text-to-video and first/last-frame nodes share
_seedance2_build_requestand have notask_typewidget, so the lookup defaults safely and their payloads are unchanged.Cloud needs no change. The BytePlus proxy buffers the request body, decodes a copy
into the typed struct for billing params only, and forwards the raw bytes. The one body
rewrite is the
bitrate_modeinjection viamap[string]any, which carries an in-codecomment that unmodeled fields survive. There is no OpenAPI request validator on the route,
so the new field passes through untouched. Adding it to
openapi.ymlin the cloud repo isworth doing for accuracy but is documentation only, and does not block this.
Billing is unaffected: an extension always carries video input, so it already lands on the
video-input rate in both the badge estimate and the post-run extractor.
Verification
Verified end to end locally against the live API by @purzbeats: extension generates
correctly with the ratio widget left on its
16:9default, which is the case that failson
mastertoday.Automated coverage in
tests-unit/comfy_api_nodes_test/bytedance_seedance2_test.py(8 tests) pins the coercion matrix above, that
extendpreserves a non-default duration,that 2.0 omits the field, and that both price-badge references moved together.
Also confirmed manually: all 14 ByteDance nodes still load; the widget appears only on the
2.5 reference node; no
video_editingreference remains in tracked files.Known gaps, deliberately left out
Flagging these rather than quietly expanding the diff.
video_editingboolean come back withtask_typeatauto, which is the old defaultbehaviour, so nothing breaks. But an intentional edit needs re-selecting. Keeping the
boolean alongside the combo would avoid this at the cost of two ways to say one thing.
This is the decision most worth a second opinion.
duration: -1is still unreachable outside an edit, because the slider's minimum is4. The vendor docs recommend
ratio: adaptive+duration: -1together as theconfiguration that avoids constraint errors on
auto, so this gap costs us twice.second source clip for
edit, so a 3 second clip passes locally and fails at the API.prompt to contain an intent keyword (
continue/extend forward/extend backwardfor extension;
add/remove/replace/changefor editing), otherwise the modelclassifies the job differently and returns
TaskTypeMismatcheven whentask_typeisset correctly. Worth putting in the tooltip.
return_last_frameis not implemented. Separate feature with its own output socket,complementary to extension: extend continues coherently within the 30 second context
ceiling, last-frame chaining runs past it but loses coherence at each seam. Already in
the cloud schema, so it would need no cloud work either.
Suggested test plan for review
16:9. Request must go outas
adaptiveand succeed.Direction is prompt-only, there is no parameter for it.
reference_video: must fail immediately, before upload.video_editingbehaviour must be identical undertask_type: edit.task_typeand confirm it still recalculates.Docs: Create a video generation task
and Must-read before use.
🤖 Generated with Claude Code
https://claude.ai/code/session_01H8RGpZs478f6b3ps64zgba
API Node PR Checklist
Scope
Pricing & Billing
If Need pricing update:
QA
Comms