[feat] Add Cosmos Predict2.5 distilled profile to DreamVerse - #1768
Open
Mister-Raggs wants to merge 17 commits into
Open
[feat] Add Cosmos Predict2.5 distilled profile to DreamVerse#1768Mister-Raggs wants to merge 17 commits into
Mister-Raggs wants to merge 17 commits into
Conversation
Cosmos-Predict2.5 2B text encoding crashes on load because
`apply_chat_template(tokenize=True)` returns a transformers `BatchEncoding`
-- a `collections.UserDict`, i.e. a `Mapping` but NOT a `dict` -- which the
`isinstance(tokenizer_output, dict)` check missed, so the id extraction fell
through to `raise RuntimeError("Unexpected chat_template output type")`.
Match on `Mapping` instead (every `dict` is a `Mapping`, so existing
plain-dict and list outputs are unchanged) and lift the normalization into a
tested `_normalize_chat_template_ids` helper. Add weight-free parametrized
regression tests over every shape apply_chat_template can return.
Address review: the helper documents a flat list[int] contract, but a nested list with batch>1 slipped through the len==1 unwrap guard and was returned as-is, violating the contract and breaking downstream padding. Raise on batch>1 instead of silently returning a nested list; add tests.
Contributor
Merge Protections🔴 1 of 1 protections blocking · waiting on 👀 reviews and 🤖 CI
🔴 PR merge requirementsWaiting for
This rule is failing.
|
Mister-Raggs
marked this pull request as ready for review
August 27, 2026 20:54
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.
Purpose
Add an experimental DreamVerse runtime profile for the Cosmos Predict2.5 2B distilled T2W path introduced in #1767. This lets DreamVerse generate and browser-stream independent Cosmos clips while preserving the existing LTX2 defaults.
This PR is intentionally stacked on #1767 and should be reviewed after that core model PR. Until #1767 merges, GitHub will show its core commits in this diff as well; the DreamVerse-specific change is commit
056de6eb6.Changes
cosmos25-distilledmodel profile with the validated BF16 + Torch SDPA settings:704x1280, 77 frames, 16 FPS, four steps.Test plan and results
Media
Segment 1 — initial robotic-arm prompt
cosmos25-dreamverse-2.mp4
Segment 2 — independently generated follow-up
cosmos25-dreamverse-1.mp4
Local focused tests:
test_config.py,test_gpu_pool.py, andtest_video_generation_cosmos25.py: 21 passed.End-to-end on Spark / GB10:
704x1280x77, four-step segment generated in about 136.5 seconds after model load.Scope and limitations
DREAMVERSE_MODEL_PATHto that directory.PATHorFASTVIDEO_FFMPEG_BIN.Checklist