Skip to content

fix(material): default WaveSpeed text-to-video to alibaba/wan-3.0 - #1842

Merged
harry0703 merged 2 commits into
harry0703:mainfrom
chengzeyi:fix/wavespeed-default-t2v-model
Nov 24, 2026
Merged

harry0703 merged 2 commits into
harry0703:mainfrom
chengzeyi:fix/wavespeed-default-t2v-model

Conversation

@chengzeyi

Copy link
Copy Markdown
Contributor

Switches the default WaveSpeed text-to-video model to alibaba/wan-3.0/text-to-video and sets the duration bounds to the 2–30 s range its request schema accepts.

  • The fields the provider sends (prompt, aspect_ratio, duration) all exist in that schema, and every VideoAspect value (16:9, 9:16, 1:1) is in its aspect_ratio enum.
  • With the 2 s lower bound, the WebUI's default 3 s clip is submitted as requested instead of being raised to 4 s.
  • Users who set wavespeed_text_to_video_model / wavespeed_min_duration / wavespeed_max_duration keep their values.

Tests: pytest test/services/test_material.py test/services/test_settings_providers.py test/services/test_task.py (277 passed, 3 skipped). The clamp tests now use inputs outside the new 2–30 s range.

🤖 Generated with Claude Code

Switch the default WaveSpeed text-to-video model to
alibaba/wan-3.0/text-to-video and set the duration bounds to the
2-30 s range its request schema accepts. The payload fields the
provider sends (prompt, aspect_ratio, duration) all exist in that
schema, and every VideoAspect value (16:9, 9:16, 1:1) is in its
aspect_ratio enum.

With the 2 s lower bound, the WebUI's default 3 s clip is submitted
as requested instead of being raised to 4 s. Users who set
wavespeed_text_to_video_model and the duration bounds keep their
configured values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T18:16:33.530581Z 59cfad8 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f4ce1b0918

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/services/material.py Outdated
# 默认模型 alibaba/wan-3.0/text-to-video 只接受 2-30 秒;超出范围的请求会
# 被 API 直接拒绝,因此必须在提交前收敛到模型支持区间,多出的时长由现有
# 剪辑流程按片段时长裁掉。
WAVESPEED_MIN_DURATION_SECONDS = 2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve bounds for an explicitly pinned legacy model

When upgrading an installation that explicitly sets wavespeed_text_to_video_model = "bytedance/seedance-2.0-fast/text-to-video" but, correctly under the old defaults, omits wavespeed_min_duration, this new fallback is used regardless of the configured model. A normal 3-second request is now sent as 3 seconds instead of being clamped to Seedance's 4-second minimum, so WaveSpeed rejects the clip and the material flow produces no video; choose fallback bounds based on the selected model or migrate this legacy explicit-model configuration.

Useful? React with 👍 / 👎.

@harry0703

Copy link
Copy Markdown
Owner

Thanks for updating the WaveSpeed default. I checked that Wan receives a 3-second request as intended.

I also tested an existing config that pins Seedance 2.0 Fast and leaves the duration bounds unset. For the same clip, main sends 4 seconds. With this patch it sends 3, and my local test server rejects it when it enforces Seedance's limits. Could we choose the fallback bounds based on the selected model so both configurations work?

When wavespeed_min_duration / wavespeed_max_duration are unset, pick the
fallback range from the configured model instead of always using the
Wan 3.0 range: 2-30 s for alibaba/wan-3.0/text-to-video and 4-15 s for
bytedance/seedance-2.0-fast/text-to-video, matching each model's request
schema. Any other model keeps the 4-15 s range it had before this
change, so configs that pin Seedance 2.0 Fast keep sending 4 s for a
3 s clip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chengzeyi

Copy link
Copy Markdown
Contributor Author

Thanks for catching that. Pushed 59cfad8: when wavespeed_min_duration / wavespeed_max_duration are unset, the fallback range now follows the selected model, taken from each model's request schema on WaveSpeed: 2-30 s for alibaba/wan-3.0/text-to-video, 4-15 s for bytedance/seedance-2.0-fast/text-to-video. Any other model keeps the 4-15 s fallback it had on main. Explicitly configured bounds still take precedence.

Added a test covering default Wan (3 s request sends 3), pinned Seedance 2.0 Fast (3 sends 4, 20 sends 15) and an unknown model (3 sends 4). It fails against the previous commit and passes now; test/services/test_material.py passes in full (76 tests) and ruff is clean. This also covers the Codex note on the same line, which described the same case.

@harry0703
harry0703 merged commit dabfd3f into harry0703:main Nov 24, 2026
3 checks passed
@harry0703

Copy link
Copy Markdown
Owner

Thanks for following up on this and adding the regression test! I reran both paths locally and confirmed Wan gets the requested 3 seconds, while pinned Seedance configs still get 4. Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants