Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ This repository is the home of the models: everything for exploring, running, an
<tr><td><b>Explore runnable notebooks</b></td><td><a href="cookbooks/cosmos3/README.md">Cookbooks</a></td><td>browse</td></tr>
<tr><td><b>Evaluate a model</b></td><td><a href="evaluation/">Evaluation suites</a> — PAIBench, Physics-IQ, VLMEvalKit</td><td>hours</td></tr>
<tr><td><b>Check latency &amp; throughput</b></td><td><a href="inference_benchmarks.md">Benchmarks</a></td><td>browse</td></tr>
<tr><td><b>Run Cosmos3-Edge on device</b></td><td><a href="cookbooks/cosmos3/reasoner/run_with_trt_edge_llm.ipynb">Reasoner</a> and <a href="cookbooks/cosmos3/generator/action/run_policy_with_trt_edge_llm.ipynb">policy</a> with TensorRT-Edge-LLM</td><td>setup</td></tr>
</table>

## Generate your first video
Expand Down Expand Up @@ -164,7 +165,7 @@ Training, optimization, and deployment tooling lives in [Cosmos Framework](https
| [Cosmos Curator](https://github.com/NVIDIA/cosmos-curator) | Distributed data curation: processing, annotation, filtering, dedup |
| [Cosmos Evaluator](https://github.com/NVIDIA/cosmos-evaluator) | Automated evaluation system for world generation & reasoning outputs |

Cosmos 3 runs on Diffusers, Transformers, vLLM, vLLM-Omni, SGLang, TensorRT-LLM, and NIM — pick a backend in the [environment setup guide](cookbooks/cosmos3/README.md).
Cosmos 3 runs on Diffusers, Transformers, vLLM, vLLM-Omni, SGLang, TensorRT-LLM, TensorRT-Edge-LLM, and NIM — pick a backend in the [environment setup guide](cookbooks/cosmos3/README.md).

## Community & contributing

Expand Down
37 changes: 37 additions & 0 deletions cookbooks/cosmos3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ backend you want to run and follow that one section.
| [Diffusers](#diffusers) | Direct generation with `Cosmos3OmniPipeline` | Generator (Audiovisual) |
| [TensorRT-LLM Generator](#tensorrt-llm-generator) | OpenAI-compatible VisualGen server (image/video/audio/action/transfer generation) | Generator (Audiovisual, Action, **Transfer**) |
| [TensorRT-LLM Reasoner](#tensorrt-llm-reasoner) | OpenAI-compatible image/video reasoning server | Reasoner |
| [TensorRT-Edge-LLM](#tensorrt-edge-llm) | On-device TensorRT runtime for Cosmos3-Edge reasoning and DROID policy | Reasoner (Edge), Generator (Action / Policy) |
| [Transformers](#transformers) | Hugging Face Transformers inference | Reasoner |
| [vLLM](#vllm) | OpenAI-compatible reasoning server (image/video understanding) | Reasoner |
| [vLLM-Omni](#vllm-omni) | OpenAI-compatible generation server (image/video/audio/action/transfer) | Generator (Audiovisual, Action, **Transfer**) |
Expand Down Expand Up @@ -448,6 +449,42 @@ The server exposes `/health` and the OpenAI-compatible API at
[Reasoner TensorRT-LLM notebook](reasoner/run_with_tensorrt_llm.ipynb) for image
and video requests.

## TensorRT-Edge-LLM

On-device **TensorRT** path for **Cosmos3-Edge** multimodal reasoning and
**Cosmos3-Edge-Policy-DROID** policy generation. This is a different stack from
[TensorRT-LLM Reasoner](#tensorrt-llm-reasoner) / [Generator](#tensorrt-llm-generator):
export ONNX on an x86 host, build TensorRT engines on the target (Jetson
Thor/Orin, DRIVE, DGX Spark, or an x86 developer build), then run the C++
inference binaries.

Use [TensorRT-Edge-LLM](https://github.com/NVIDIA/TensorRT-Edge-LLM) **v0.11.0**.
Complete the upstream
[Installation](https://nvidia.github.io/TensorRT-Edge-LLM/user_guide/getting_started/installation.html)
guide first (Python export package on the host; C++ runtime on the device).

Policy examples also require building the C++ runtime with
`-DBUILD_EXPERIMENTAL_MODELS=ON`.

Set a workspace and the Edge checkpoints:

```bash
export EDGELLM_ROOT="${EDGELLM_ROOT:-$PWD/TensorRT-Edge-LLM}"
export POLICY_CHECKPOINT=nvidia/Cosmos3-Edge-Policy-DROID
export REASONING_CHECKPOINT=nvidia/Cosmos3-Edge
export ONNX_DIR="${ONNX_DIR:-$HOME/tensorrt-edgellm-workspace/Cosmos3-Edge/onnx}"
export ENGINE_DIR="${ENGINE_DIR:-$HOME/tensorrt-edgellm-workspace/Cosmos3-Edge/engines}"
```

Runnable cookbooks:

- Reasoner: [`reasoner/run_with_trt_edge_llm.ipynb`](reasoner/run_with_trt_edge_llm.ipynb)
- Policy: [`generator/action/run_policy_with_trt_edge_llm.ipynb`](generator/action/run_policy_with_trt_edge_llm.ipynb)

Upstream reference:
[Cosmos3-Edge VLA guide](https://nvidia.github.io/TensorRT-Edge-LLM/user_guide/examples/vla/cosmos3.html)
(export → build → run for reasoning and policy).

## Transformers

Local Python inference for the Cosmos3 Reasoner. This backend uses the
Expand Down
31 changes: 28 additions & 3 deletions cookbooks/cosmos3/generator/action/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ The rest of this doc shows how to run these modes on selected embodiments direct
- [Run with vLLM-Omni](#run-with-vllm-omni)
- [Quickstart](#quickstart-3)
- [Notebook walkthrough](#vllm-omni-notebook-walkthrough)
- [Run with TensorRT-Edge-LLM](#run-with-tensorrt-edge-llm)
- [Post-Train for Cosmos3-Nano-Policy-DROID](#post-train-for-cosmos3-nano-policy-droid)

## Overview

Examples are shown across native PyTorch (Cosmos Framework), Diffusers,
TensorRT-LLM, and vLLM-Omni. Every backend uses the sample
assets under [`assets/`](./assets) and covers three tasks:
Examples for native PyTorch (Cosmos Framework), Diffusers, TensorRT-LLM,
and vLLM-Omni use the sample assets under [`assets/`](./assets) and cover
the three tasks above. TensorRT-Edge-LLM covers the Edge policy task only,
with the same sample assets.

Environment setup for all backends is centralized in the shared
[Cosmos3 cookbooks environment setup](../../README.md) guide; each backend below
Expand Down Expand Up @@ -292,6 +294,29 @@ write outputs under `outputs/cosmos3_action_vllm/`:
- [`run_policy_with_vllm_omni.ipynb`](./run_policy_with_vllm_omni.ipynb) — policy
inference for DROID through the async video API.

## Run with TensorRT-Edge-LLM

### Quickstart

On-device TensorRT path for **Cosmos3-Edge-Policy-DROID**. Set up the shared
[TensorRT-Edge-LLM](../../README.md#tensorrt-edge-llm) environment (upstream
install; C++ runtime with `-DBUILD_EXPERIMENTAL_MODELS=ON`). Then follow
[`run_policy_with_trt_edge_llm.ipynb`](./run_policy_with_trt_edge_llm.ipynb):
export → `cosmos3_policy_build` → `cosmos3_policy_inference`.

This is separate from workstation [vLLM-Omni](#run-with-vllm-omni) policy
serving. Multimodal reasoning on the same Edge-LLM runtime is documented in
[`../../reasoner/run_with_trt_edge_llm.ipynb`](../../reasoner/run_with_trt_edge_llm.ipynb).

### Notebook walkthrough

[`run_policy_with_trt_edge_llm.ipynb`](./run_policy_with_trt_edge_llm.ipynb)
builds the same 640×540 DROID `concat_view` as the vLLM-Omni / SGLang policy
notebooks (from `assets/droid_lerobot_example`), runs
`cosmos3_policy_inference` with `--viewPoint concat_view`, and writes `action.json`
(`[batch, chunk, action_dimension]`). Optional `--steps` / `--seed` match the
upstream VLA guide.

## Post-Train for Cosmos3-Nano-Policy-DROID

To reproduce our post-training recipe for [Cosmos3-Nano-Policy-DROID](https://huggingface.co/nvidia/Cosmos3-Nano-Policy-DROID), use the
Expand Down
Loading
Loading