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.
|
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.