Uh oh!
There was an error while loading. Please reload this page.
feat: Add Motif-Video model and pipelines - #13551
Conversation
Quick ping for visibility. This PR adds Motif-Video (T2V/I2V + new transformer and pipelines). Would appreciate your feedback, especially on dependency/version constraints:
This is currently blocking some diffusers-side integration, so your input would help. A working branch for this integration is available here. |
…dance support Add complete Motif Video implementation to diffusers: New Models: - Add MotifVideoTransformer3DModel with T5Gemma2Encoder for multimodal conditioning - Supports text-to-video and image-to-video generation with vision tower integration New Pipelines: - Add MotifVideoPipeline for text-to-video generation - Default resolution: 736x1280, 121 frames, 25 fps - Supports classifier-free guidance and AdaptiveProjectedGuidance - Add MotifVideoImage2VideoPipeline for image-to-video generation - First frame conditioning with vision encoder - Same defaults as T2V pipeline Enhanced Guidance: - Update AdaptiveProjectedGuidance with normalization_dims parameter - Support "spatial" normalization for 5D tensors (per-frame spatial normalization) - Support custom dimension lists for flexible normalization - Update AdaptiveProjectedMixGuidance with same parameter Documentation & Tests: - Add comprehensive API documentation for transformer and pipelines - Add test suites for both T2V and I2V pipelines - Register all new components in __init__ files - Add dummy objects for torch and transformers backends Total: 18 files changed, 3416 insertions(+), 2 deletions(-)
cd20ffc to
81cce23Comparesayakpaul
commented
Apr 23, 2026
I think we can guard the transformers import in the pipeline with something like
|
waitingcheung
commented
Apr 23, 2026
We have something like this at the top of the pipeline code to guide the users to upgrade the # Check transformers version before importing T5Gemma2Encoderifnotis_transformers_version(">=", "5.1.0"):
importtransformersraiseImportError(
f"MotifVideoPipeline requires transformers>=5.1.0. "f"Found: {transformers.__version__}. ""Please upgrade transformers: pip install transformers --upgrade"
) |
sayakpaul
commented
Apr 23, 2026
Then it will cut it. |
waitingcheung
commented
Apr 28, 2026
HuggingFaceDocBuilderDev
commented
May 13, 2026
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
… into feat/motif-video
yiyixuxu
left a comment
There was a problem hiding this comment.
thanks, left some final comments/qustions
I think we can merge this soon
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
yiyixuxu
commented
May 13, 2026
@claude-2-serge can you do a final review? |
🤗 Serge says:
|
yiyixuxu
commented
May 13, 2026
@claude can you do a final review?
|
Claude finished @yiyixuxu's task in 6m 6s —— View job Final Review of PR #13551: Motif-Video
Remaining TODOs from open reviewer requests1. @yiyixuxuasked to test this now that #13697 has merged. The model still lacks _keep_in_fp32_modules= ["time_text_embed", "norm"]Once this is added, the ad hoc 2. Inline @yiyixuxurequested inlining this function. The Wan transformer inlines gradient checkpointing directly in 3. This clones the full hidden state tensor on every forward pass, but New findings4. Inconsistent guider None-safety — Both pipelines check
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
dg845
left a comment
There was a problem hiding this comment.
Thanks for your hard work on this PR! Left a few final comments :).
sayakpaul
commented
May 14, 2026
@claude-2-serge can you do a final review? |
🤗 Serge says:
|
Uh oh!
There was an error while loading. Please reload this page.
What does this PR do?
This PR adds support for Motif-Video - a text-to-video (T2V) and image-to-video (I2V) diffusion model from Motif Technologies. The implementation includes the transformer architecture, both pipeline variants, guiding configurations, and comprehensive documentation.
Changes
New Files
src/diffusers/models/transformers/transformer_motif_video.py- MotifVideoTransformer3DModelsrc/diffusers/pipelines/motif_video/pipeline_motif_video.py- Text-to-Videosrc/diffusers/pipelines/motif_video/pipeline_motif_video_image2video.py- Image-to-Videosrc/diffusers/pipelines/motif_video/pipeline_output.pytests/pipelines/motif_video/test_motif_video.pytests/pipelines/motif_video/test_motif_video_image2video.pydocs/source/en/api/models/motif_video_transformer_3d.mddocs/source/en/api/pipelines/motif_video.mdKey Features
Version Requirements
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.