Repository navigation
Conversation
New cookbooks/cosmos3/quantization/ ships a self-contained ModelOpt static-scale FP8 recipe: - src/: the Cosmos3 DiT model + full recipe (load, calibrate on real denoising, export a drop-in diffusers checkpoint). - notebooks/: quantize Nano/Super, Super Text-to-Image, and Super Image-to-Video (base + 4-step distilled). - Reproduces the shipped FP8 checkpoints bit-for-bit. Also add a "Quantized Checkpoints" section to the vLLM-Omni generator notebooks (audiovisual, action, transfer) and the vLLM reasoner notebook: serving the FP8 build is just --revision fp8. Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
|
@wkutak , who is the tester validate the inference function and user guide in this PR? The person should be reviewer of this PR as well, approve once tested working with log test result in google doc. |
Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
|
@KrzysztofTomala - please review and approve this PR once you completed testing. |
|
vLLM cookbook The model download and server startup works fine. I had to remove from the video example as the requests were failing, but the issue is happening also on the non-FP8 model. |
|
vLLM-Omni cookbooks |
|
Quantization cookbooks Everything works, there are a couple of warning, but nothing crucial. |
KrzysztofTomala
left a comment
There was a problem hiding this comment.
Overall everything works as expected, all of the serious problems are not FP8 related
…d99f1254459ef3a4f1bd4263' Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
… README, small fixes Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
|
The transfer example issue @KrzysztofTomala mentioned will be fixed here: #299 |
|
@wkutak Can you please fix the merge conflict? |
Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
|
Merge conflicts fixed, @rickzw please review the PR |
Remove vendored Cosmos3 model code. Replace model, tokenizer, vae, and scheduler loading with cosmos-framework's API.
* Update dependency. * Use legacy calibration for all notebooks.
Migrate everything under `cookbooks/cosmos3/quantization/src` to `cosmos-framework`. Import paths in the notebooks are modified accordingly. Signed-off-by: Mu-Ti Chung <mutic@nvidia.com>
|
The recent commits are to achieve the following goals:
Blocked by NVIDIA/cosmos-framework#233. |
Moves all python helpers under `src/` from the quantization cookbooks in NVIDIA/cosmos#298 into `cosmos-framework`. The cookbooks will become thin wrappers that calls the functions to quantize checkpoints. Blocks NVIDIA/cosmos#298. --------- Signed-off-by: Mu-Ti Chung <mutic@nvidia.com> Co-authored-by: lfengad <liangf@nvidia.com> Co-authored-by: pengcuo <pzeren@nvidia.com>
|
Does it make sense to not have a folder containing 3 notebooks, but take those 3 notebook out of folder and have 3 notebook parallel to readme.md? |
…de to cosmos-framework repo. Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
## Problem The original quantization pipeline did not create the corresponding `modelopt_state.pth` that is presented in the released FP8 checkpoints. The file is required for HuggingFace `transformers`/`diffusers` to load the and run inference on the quantized checkpoints. ## Changes * Export the missing `modelopt_state.pth` files for `transformers` and `diffusers`. * Fix updated functions imported by legacy mode. * Add mixed precision W8A16 policy configuration. Blocks NVIDIA/cosmos#298 --------- Signed-off-by: Mu-Ti Chung <mutic@nvidia.com> Signed-off-by: Wojciech Kutak <wkutak@nvidia.com> Co-authored-by: Wojciech Kutak <wkutak@nvidia.com>
Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
) Moves all python helpers under `src/` from the quantization cookbooks in NVIDIA/cosmos#298 into `cosmos-framework`. The cookbooks will become thin wrappers that calls the functions to quantize checkpoints. Blocks NVIDIA/cosmos#298. --------- Signed-off-by: Mu-Ti Chung <mutic@nvidia.com> Co-authored-by: lfengad <liangf@nvidia.com> Co-authored-by: pengcuo <pzeren@nvidia.com>
## Problem The original quantization pipeline did not create the corresponding `modelopt_state.pth` that is presented in the released FP8 checkpoints. The file is required for HuggingFace `transformers`/`diffusers` to load the and run inference on the quantized checkpoints. ## Changes * Export the missing `modelopt_state.pth` files for `transformers` and `diffusers`. * Fix updated functions imported by legacy mode. * Add mixed precision W8A16 policy configuration. Blocks NVIDIA/cosmos#298 --------- Signed-off-by: Mu-Ti Chung <mutic@nvidia.com> Signed-off-by: Wojciech Kutak <wkutak@nvidia.com> Co-authored-by: Wojciech Kutak <wkutak@nvidia.com>
Nano and Super FP8 checkpoints now live in dedicated repos instead of the fp8 revision of the bf16 repos. Update the vLLM-Omni generator notebooks (audiovisual, action fd/id, transfer), the vLLM reasoner notebook, and the quantization README. Other Super variants are unchanged. Also fix the stale quantize_nano_super link in the audiovisual notebook. Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
…P8 repos in README The pinned vllm-openai nightly tag no longer exists. v0.31.0 loads and serves nvidia/Cosmos3-Super-FP8. Replace the FP8 coming-soon entries for Super and Nano in the model table with links to the new FP8 repos. Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
Adopt the catalog repository layout and remove legacy cookbook copies now maintained in Cosmos Framework. Preserve untracked workspace files.
…cipe Retain the latest main README and tracked Framework links while adding the approved FP8 model table, precision notes, and S/M quantization catalog budgets.
|
@wkutak , in the COOKBOOK.md, can you change the word "Quantization" to "Quantized (FP8)"? |
Signed-off-by: Wojciech Kutak <wkutak@nvidia.com>
pengcuo
left a comment
There was a problem hiding this comment.
LGTM. Docs-only; the COOKBOOK.md#inference anchor resolves. The new quantization link targets cosmos-framework main and 404s until cosmos-framework#329 merges, so land that first. See the note there about aligning the fp8-branch availability claim in docs/reference/models.md.
Withdrawn by reviewer pending further checks (tests, checkpoint availability, doc consistency).
pengcuo
left a comment
There was a problem hiding this comment.
Docs-only change; COOKBOOK.md#inference resolves. Two things to fix before this goes onto the public README (re-posting after withdrawing my earlier approve to check properly):
Blocking
README.mdanddocs/reference/models.mdlinknvidia/Cosmos3-Nano-FP8andnvidia/Cosmos3-Super-FP8, which are currently private on Hugging Face (unauthenticated -> 401/404). External readers of this README will get dead links. Please make the repos public before merging, or hold this PR until they are.- The new
[quantization]link inCOOKBOOK.mdpoints atcosmos-framework/blob/main/.agents/skills/cookbooks/cosmos3/quantization/README.md, which 404s until NVIDIA/cosmos-framework#329 merges. Land that first. (Nit: every other cookbook link in that table is annvda.wsshort link.)
Non-blocking
- The four Super
fp8branches inmodels.mddo exist publicly and containhf_quant_config.json, so that table is fine; cosmos-framework#329's README currently says it does not assume those revisions exist -- worth aligning the two. - PR description says the recipe "reproduces the shipped FP8 checkpoints bit-for-bit" and that serving is "just
--revision fp8". The cosmos-framework#329 README says neither mode guarantees reproduction of published scales, and that--revisionalone is not honored by the vLLM-Omni Cosmos3 pipeline. The committed docs here are consistent with #329; just flagging the description so nobody quotes it.
…t column - docs/reference/models.md: "Quantization" heading -> "Quantized models". - The quantized-checkpoint table is now an HTML table with `nowrap` on the first column, so each checkpoint name stays on one line (GitHub strips <nobr> and style attributes, but keeps `nowrap`). - models.md and README.md: "quantization cookbook" -> "cookbook". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Yao Xu <yaoxu@nvidia.com>
|
@wkutak , approved, please merge once the models are live |
New cookbooks/cosmos3/quantization/ ships a self-contained ModelOpt static-scale FP8 recipe:
Also add a "Quantized Checkpoints" section to the vLLM-Omni generator notebooks (audiovisual, action, transfer) and the vLLM reasoner notebook: serving the FP8 build is just --revision fp8.