Skip to content

[NVBug 6981670][docs] Fix Cache Diffusion prepare calls - #2972

Merged
yingguo-trt merged 1 commit into
NVIDIA:mainfrom
yingguo-trt:docs/nvbug-6981670-cache-prepare-arguments
Oct 23, 2026
Merged

yingguo-trt merged 1 commit into
NVIDIA:mainfrom
yingguo-trt:docs/nvbug-6981670-cache-prepare-arguments

Conversation

@yingguo-trt

@yingguo-trt yingguo-trt commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Type of change: documentation.

Remove the obsolete num_inference_steps argument from the Cache Diffusion README's legacy TensorRT and Customize examples. Both calls now match the existing prepare(pipe, config_list) API and avoid TypeError: prepare() takes 2 positional arguments but 3 were given.

Usage

cachify.prepare(pipe, SDXL_DEFAULT_CONFIG)

Testing

  • pre-commit run --files examples/diffusers/README.md and git diff --check.
  • B100 reproduction with official ModelOpt 0.48.0rc1: the three-argument call fails; the corrected call succeeds on the same tiny UNet2DConditionModel on cuda:0, wrapping three cache modules. The cache implementation is unchanged between that release and this PR's base. No model forward or full SDXL/TensorRT inference was run.
  • Internal evidence: Jenkins #65.

Before your PR is "Ready for review"

  • Is this change backward compatible?: ✅ Documentation only.
  • If you copied code from other sources or added a dependency, did you follow CONTRIBUTING.md?: N/A
  • Did you write any new necessary tests?: N/A Documentation correction; the actual API calls were verified above.
  • Did you update Changelog?: N/A
  • Did you get Claude approval on this PR?: N/A Small documentation correction.

Additional Information

Related: NVBug 6981670.

Summary by CodeRabbit

  • Documentation
    • Updated both Cache Diffusion examples to call cachify.prepare with the pipeline and configuration only. The examples no longer include an inference-step count in that call, keeping their setup instructions consistent across both examples. No other changes to the examples or public declarations are noted.

@yingguo-trt
yingguo-trt requested a review from a team as a code owner October 23, 2026 08:52
@yingguo-trt
yingguo-trt requested a review from Zhehao-Hu October 23, 2026 08:52
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between ace9fd9 and 98b03bb.

📒 Files selected for processing: 1
  • examples/diffusers/README.md

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Walkthrough

Both Cache Diffusion examples remove num_inference_steps from their cachify.prepare calls.

Changes: Cache Diffusion examples

Layer / File(s) Summary
Update example calls
examples/diffusers/README.md
The TensorRT and customization examples no longer pass num_inference_steps to cachify.prepare.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested labels: cherry-pick-0.48.0

Merge Risk: ⚪ Minimal · up to 98b03

The documentation-only update is ready to merge.

Pre-merge checks: Passed 6
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: it fixes the Cache Diffusion prepare calls in the docs, which matches the raw summary. The PR removes the num_inference_steps argument from both Cache Diffusion example…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Security Anti-Patterns Passed PASS. The pull request changes only examples/diffusers/README.md. It removes an obsolete argument from two documentation calls. No Python files, modelopt package code, dependency files, security-sen…
Full details: Title check

Explanation

The title names the change: it fixes the Cache Diffusion prepare calls in the docs, which matches the raw summary. The PR removes the num_inference_steps argument from both Cache Diffusion examples in examples/diffusers/README.md, so the title is specific and accurate. The NVBug tracking prefix is acceptable and does not make the title vague.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Full details: Security Anti-Patterns

Explanation

PASS. The pull request changes only examples/diffusers/README.md. It removes an obsolete argument from two documentation calls. No Python files, modelopt package code, dependency files, security-sensitive loading calls, dynamic execution, or # nosec comments were added.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@yingguo-trt
yingguo-trt removed the request for review from Zhehao-Hu October 23, 2026 08:54
@yingguo-trt
yingguo-trt enabled auto-merge (squash) October 23, 2026 08:54

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

Bot review (bedrock-claude-opus-5-5) — DM the bot to share feedback.

Approving: this is a correct docs-only fix. cachify.prepare is defined as prepare(pipe, config_list), so the README's old three-argument calls would raise a TypeError.

No action needed.

@yingguo-trt
yingguo-trt merged commit cb3aba6 into NVIDIA:main Oct 23, 2026
34 checks passed
@codecov

codecov Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.53%. Comparing base (ace9fd9) to head (98b03bb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2972      +/-   ##
==========================================
- Coverage   79.53%   79.53%   -0.01%     
==========================================
  Files         660      660              
  Lines       74720    74720              
==========================================
- Hits        59430    59429       -1     
- Misses      15290    15291       +1     
Flag Coverage Δ
unit 61.06% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

kevalmorabia97 added a commit that referenced this pull request Oct 28, 2026
#2928 #2885 #2908 #2929 #2950 #2972 #2877 #2951 #2816 #3005 #3012 #2971 #3015 #3006 #3026 #2988 #3028 #1860 #3030 #2612 #3033 #2653 #2599 #2655 #2618 #2868 #3032 #3027 #2869 #2984 #2975 #2345 #3020 #2997 (#3072)

## Cherry-picked PRs

- #2817
- #2671
- #2892
- #2876
- #2910
- #2911
- #2919
- #2904
- #2937
- #2928
- #2885
- #2908
- #2929
- #2950
- #2972
- #2877
- #2951
- #2816
- #3005
- #3012
- #2971
- #3015
- #3006
- #3026
- #2988
- #3028
- #1860
- #3030
- #2612
- #3033
- #2653
- #2599
- #2655
- #2618
- #2868
- #3032
- #3027
- #2869
- #2984
- #2975
- #2345
- #3020
- #2997

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Diffusion exports now offer more control over attention-quantizer
metadata and preserve sparse-attention settings in a format compatible
with downstream tooling.
* Model loading better handles select bundled model implementations, and
Docker guidance now covers writable CUDA-extension cache locations.
* **Bug Fixes**
* Improved reliability for model export and checkpoint saving,
quantization across devices, ONNX processing, and calibration.
* Temporary TensorRT and autotuning artifacts now use private
directories by default.
* **Documentation**
* Updated installation guidance, compatibility notes, and links;
corrected typos across guides and examples.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Chad Voegele <[email protected]>
Signed-off-by: Rohan Joshi <[email protected]>
Signed-off-by: LinCanNerd <[email protected]>
Signed-off-by: Keval Morabia <[email protected]>
Signed-off-by: weimingc <[email protected]>
Signed-off-by: Noey Yang <[email protected]>
Signed-off-by: Kai Xu <[email protected]>
Signed-off-by: Zhehao Hu <[email protected]>
Signed-off-by: noeyy-mino <[email protected]>
Signed-off-by: joe-nv <[email protected]>
Signed-off-by: yingguo-trt <[email protected]>
Signed-off-by: Shengliang Xu <[email protected]>
Signed-off-by: Chenjie Luo <[email protected]>
Signed-off-by: anmaurya001 <[email protected]>
Signed-off-by: Connor Baker <[email protected]>
Signed-off-by: wiederse <[email protected]>
Signed-off-by: Vu Dinh <[email protected]>
Signed-off-by: Pratik Gandhi <[email protected]>
Signed-off-by: Michael Rusu <[email protected]>
Signed-off-by: Michael-Rusu <[email protected]>
Signed-off-by: namgyu-youn <[email protected]>
Signed-off-by: Sylvester Kaczmarek <[email protected]>
Signed-off-by: Javier de Jesus <[email protected]>
Signed-off-by: javierdejesusda <[email protected]>
Signed-off-by: Zhiyu Cheng <[email protected]>
Signed-off-by: Juhi Mittal <[email protected]>
Signed-off-by: Dmitry Rantovov <[email protected]>
Signed-off-by: h-guo18 <[email protected]>
Co-authored-by: Chad Voegele <[email protected]>
Co-authored-by: LinCanNerd <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: Keval Morabia <[email protected]>
Co-authored-by: Wei-Ming Chen <[email protected]>
Co-authored-by: noeyy-mino <[email protected]>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: kaix-nv <[email protected]>
Co-authored-by: Zhehao Hu <[email protected]>
Co-authored-by: joe <[email protected]>
Co-authored-by: yingguo-trt <[email protected]>
Co-authored-by: Shengliang Xu <[email protected]>
Co-authored-by: Chenjie Luo <[email protected]>
Co-authored-by: anmaurya001 <[email protected]>
Co-authored-by: Connor Baker <[email protected]>
Co-authored-by: Jiao Mingyang <[email protected]>
Co-authored-by: Vu Dinh <[email protected]>
Co-authored-by: Pratik Gandhi <[email protected]>
Co-authored-by: Michael R <[email protected]>
Co-authored-by: Michael-Rusu <[email protected]>
Co-authored-by: namgyu-youn <[email protected]>
Co-authored-by: Sylvester Kaczmarek <[email protected]>
Co-authored-by: Javier De Jesus <[email protected]>
Co-authored-by: Zhiyu <[email protected]>
Co-authored-by: Juhi Mittal <[email protected]>
Co-authored-by: Dmitry Rantovov <[email protected]>
Co-authored-by: h-guo18 <[email protected]>
@rohansjoshi rohansjoshi added the cherry-pick-done Added by bot once PR is cherry-picked to the release branch label Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-0.48.0 cherry-pick-done Added by bot once PR is cherry-picked to the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants