-
Notifications
You must be signed in to change notification settings - Fork 16
feat(policies): add CosmosPredictPolicy for Cosmos-Predict2.5/robot/policy #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
cagataycali
wants to merge
6
commits into
strands-labs:main
Choose a base branch
from
cagataycali:feat/cosmos-policy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b9cf9ea
feat(policies): add CosmosPredictPolicy for Cosmos-Predict2.5/robot/p…
cagataycali 7008847
fix(deps): add requests to [cosmos] extras and mypy ignore list
cagataycali 49db20d
fix(tests): widen expected exception for draccus/lerobot compat
strands-agent 904809c
fix(lerobot): catch TypeError from dataclass field ordering in policy…
cagataycali 027f1fe
Merge branch 'main' into feat/cosmos-policy
cagataycali 9d9d7ec
fix(cosmos-predict): align reset() signature with Policy ABC + drop d…
cagataycali File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| """Cosmos Predict 2.5 policy provider for strands-robots. | ||
|
|
||
| Wraps NVIDIA's Cosmos-Predict2.5/robot/policy checkpoint for direct | ||
| action prediction via latent-diffusion denoising. Post-trained on | ||
| LIBERO (98.5% success) and RoboCasa benchmarks. | ||
|
|
||
| Architecture: | ||
| [Camera Images + Proprio + Language] -> VAE Encoder -> Latent Sequence | ||
| -> Rectified Flow DiT (2B) -> Denoised Latent | ||
| -> Extract Action Chunk (16-step, 7-DoF) | ||
|
|
||
| Requirements: | ||
| - cosmos-predict2 package (from nvidia-cosmos/cosmos-predict2.5) | ||
| - CUDA GPU with 16GB+ VRAM | ||
|
|
||
| Usage:: | ||
|
|
||
| from strands_robots.policies import create_policy | ||
|
|
||
| policy = create_policy( | ||
| "cosmos_predict", | ||
| model_id="nvidia/Cosmos-Policy-LIBERO-Predict2-2B", | ||
| suite="libero", | ||
| ) | ||
|
|
||
| Reference: | ||
| "Cosmos World Foundation Model Platform for Physical AI", arXiv:2511.00062 | ||
| GitHub: https://github.com/nvidia-cosmos/cosmos-predict2.5 | ||
| """ | ||
|
|
||
| from strands_robots.policies.cosmos_predict.policy import CosmosPredictPolicy | ||
|
|
||
| __all__ = ["CosmosPredictPolicy"] |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing upper bounds on
>=1.0deps. AGENTS.md > Key Conventions #2: ">=1.0deps: cap major."torch>=2.0.0,torchvision>=0.15.0,transformers>=4.40.0,huggingface-hub>=0.20.0,accelerate>=0.25.0are all unbounded.transformersandtorchmake breaking changes between minor versions; uncapped, apip install strands-robots[cosmos]six months from now can silently pull a futuretorch 4.xthat breakscosmos-predict2's pinned ABI.Proposed:
(
requestsis correctly capped.)