Skip to content

Add ModelOpt FP8 Cosmos Framework inference - #301

Open
KrzysztofTomala wants to merge 3 commits into
NVIDIA:mainfrom
KrzysztofTomala:docs/modelopt-fp8-cosmos-framework-cookbook
Open

Add ModelOpt FP8 Cosmos Framework inference#301
KrzysztofTomala wants to merge 3 commits into
NVIDIA:mainfrom
KrzysztofTomala:docs/modelopt-fp8-cosmos-framework-cookbook

Conversation

@KrzysztofTomala

@KrzysztofTomala KrzysztofTomala commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

The change describes how to run FP8 ModelOpt checkpoints using cosmos-framwork
It works for Cosmos3 Nano, Super, Super T2I, Super I2V, Super T2I 4steps, Super I2V 4steps

@KrzysztofTomala
KrzysztofTomala marked this pull request as ready for review July 31, 2026 13:56
@lfengad

lfengad commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Thx for the contribution. And is this fp8 inference functionality ready and verified in cosmos-framework?

@KrzysztofTomala
KrzysztofTomala force-pushed the docs/modelopt-fp8-cosmos-framework-cookbook branch from ce0cd0b to 3eb17c1 Compare August 3, 2026 09:18
@qmiao-hub

Copy link
Copy Markdown
Collaborator

@KrzysztofTomala can you fill the description of this PR, what models does it enable? Cosmos3 Nano/Super?

@KrzysztofTomala

Copy link
Copy Markdown
Collaborator Author

@qmiao-hub I have added the description

@lfengad The fp8 ModelOpt inference path is ready in the imaginaire4 repo, hopefully will be added to cosmos-framework soon

@KrzysztofTomala
KrzysztofTomala force-pushed the docs/modelopt-fp8-cosmos-framework-cookbook branch 2 times, most recently from 672923d to 66dc7ad Compare August 6, 2026 12:22
Signed-off-by: Krzysztof Tomala <ktomala@nvidia.com>
@KrzysztofTomala
KrzysztofTomala force-pushed the docs/modelopt-fp8-cosmos-framework-cookbook branch from 66dc7ad to 7cc502e Compare August 7, 2026 13:30
@wkutak
wkutak requested review from lfengad, pengcuo and wkutak and removed request for wkutak August 7, 2026 13:51
"set -euo pipefail\n",
"\n",
"cd \"$COSMOS3_REPO\"\n",
"FP8_CHECKPOINT=\"$COSMOS3_REPO/checkpoints/Cosmos3-Nano-FP8\"\n",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to add some comments annotation for how to chang to other FP8 released checkpoints?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added the comment

" --local-dir \"$FP8_CHECKPOINT\"\n",
"\n",
"COSMOS_TRAINING=false CUDA_VISIBLE_DEVICES=\"$CUDA_VISIBLE_DEVICES\" \\\n",
"MASTER_ADDR=\"$COSMOS3_MASTER_ADDR\" MASTER_PORT=\"$COSMOS3_NANO_TEXT_MASTER_PORT\" RANK=0 WORLD_SIZE=1 LOCAL_RANK=0 \\\n",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the Super case, we might need also consider, or with some comments metion here?
Also, do we need to show the fsdp/multiple gpu case?

@lfengad

lfengad commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

overall LGTM! @pengcuo could further see any suggestions given. Thx~

@pengcuo pengcuo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested FP8-Nano by following this recipe, and the results are correct.

@pengcuo

pengcuo commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

I have one question: How are FP8 models organized on Hugging Face, and how can they be downloaded?

@KrzysztofTomala

Copy link
Copy Markdown
Collaborator Author

I have one question: How are FP8 models organized on Hugging Face, and how can they be downloaded?

I have added more info in the notebook, the checkpoint will be released in same huggingface repo as originals, but as separate revision

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants