Repository navigation
Conversation
Port the Diffusers FP8 loading path onto the cookbooks now under .agents/skills, including ModelOpt state prefetch and quantizer validation.
pengcuo
left a comment
There was a problem hiding this comment.
Reviewed the four notebooks at cell level. The loading logic looks right to me; everything below is non-blocking except the first point, which is your own hold.
- Hold stands.
nvidia/Cosmos3-{Nano,Super,Edge}-FP8and thefp8revisions of the two 4-Step cards resolve with an NVIDIA token but return 401 anonymously as of today, so the notebooks would fail for external users until the cards are public. Please keep the "Do not merge" note until then. - I checked the concern that
load_components()afterupdate_components(transformer=...)would reload the transformer fromrepo+subfolder(where ModelOpt ignores the subfolder): diffusersModularPipeline.load_components(names=None)only loads components whose attribute is stillNone, so the preloaded FP8 transformer is kept. A one-line comment saying so next to the preload would save the next reader the same check. validate_fp8_transformercountsfloat8_e4m3fnparameters and modules with "quantizer" in their name. That shows ModelOpt restored its graph, not that the W8A8 GEMM path is active (thefp8_per_tensor_gemmimport is what enables it). Fine as a smoke check; just do not describe it as verifying FP8 GEMM support.- The same helpers (
precision_mode,resolve_pretrained_source,ensure_modelopt_state,validate_fp8_transformer) now live in four notebooks with slightly different signatures (materialize_checkpoint_dir(src, from_kwargs)vs(src, token)). That is the cookbook convention, so no change requested, but it is where drift will come from.
|
FYI I have created small PR to diffusers upstream to filter out |
Additionally, Edge-FP8 with the access to the private model repo still won't work, because checkpoint wasn't yet published to its HF repo |
Move the audiovisual support check ahead of release_pipe, and describe the FP8 weight check as a restore smoke check rather than GEMM verification.
|
Thanks for the review. The code comments are addressed in 9956d47.
|
Distilled checkpoints share one repository, so a cache keyed only by repo and precision reused the previous pipeline after COSMOS3_FP8_REVISION changed.
|
The audiovisual get_pipe() cache key now includes COSMOS3_FP8_REVISION before the cache-hit check (94a8450). Distilled FP8 checkpoints share one repository, so a key of only repo and precision returned the pipeline loaded for the previous revision. Verified with the notebook's get_pipe:
Loaded nvidia/Cosmos3-Super-Text2Image-4Step at revision fp8 on an RTX PRO 6000: 896 FP8 weights, 2709 quantizers, 0 meta tensors. Repeating the call returned the same pipeline. Switching to a nonexistent revision released that pipeline and failed the load. |
|
Thanks for the FP8 cookbook work. This is not ready to merge yet: the existing legal/model-card publication hold remains in place, and GitHub currently reports merge conflicts with main. Could you please retain the hold until the owner confirms approval/publication, then reconcile the branch with the generate-media skill migration without restoring retired notebook paths? Please let us know when both the hold and conflicts are cleared so the final diff can be reviewed. |
…kill. The audiovisual notebook was removed by the skill migration. Keep that path deleted and carry the FP8 loader in the reference that replaced it.
|
Thanks @lfengad . Merged main at 3b6bf35. The conflict with the generate-media migration is resolved, and the retired audiovisual notebook was not restored. FP8 loading for that path is now in . The publication hold is unchanged. This is not ready to merge until the owner confirms the model cards are approved and published. |
satishra-ai
left a comment
There was a problem hiding this comment.
PR #298 testing completed: PARTIAL PASS
- Initial notebook matrix: 14/14 passed.
- Updated Skill at 24372d4: 5 passed; 2 required a workaround.
- All 24 outputs validated. Conservative usage: 2.14 / 6 GPU-hours.
- Filed Nvbug 7034691 for the distilled payload KeyError: num_steps. It is inherited from main, not introduced by the PR’s FP8 changes.
Summary
Ports the Diffusers FP8 cookbook support from NVIDIA/cosmos#304 to
NVIDIA/cosmos-frameworkfollowing the cookbook repository reorganization.Updates the audiovisual, action forward/inverse dynamics, and transfer notebooks to:
COSMOS3_DIFFUSERS_PRECISIONfp8revisionstransformer/modelopt_state.pthfor a fresh Hub cacheThe existing BF16 behavior remains the default.
Repository migration
The original implementation and review history are in NVIDIA/cosmos#304.
After NVIDIA/cosmos#384 and #292 moved cookbook
content into
.agents/skills/, the changes were rebased onto the newFramework locations while preserving the current Framework setup,
uv 0.11.29guidance, and updated action imports.Validation
Validated on an NVIDIA RTX PRO 6000 Blackwell:
exercised end to end in the original implementation.
resolution.