Skip to content

Optimize diffusion calibration step sampling - #2265

Open
changwangss wants to merge 6 commits into
mainfrom
feat/diffusion-calib-step-sampling
Open

Optimize diffusion calibration step sampling#2265
changwangss wants to merge 6 commits into
mainfrom
feat/diffusion-calib-step-sampling

Conversation

@changwangss

@changwangss changwangss commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Description

This PR reduces diffusion calibration cost by decoupling calibration denoising steps from the full inference schedule.

Main changes:

  • Add calib_num_inference_steps, defaulting to 8, for diffusion calibration.
  • Pass calib_num_inference_steps directly to the diffusion pipeline, allowing the scheduler to construct its native short schedule.
  • Support higher-order schedulers without manually slicing or modifying scheduler timesteps/sigmas.
  • Forward custom pipeline_call_kwargs during calibration.
  • Preserve calibration-owned values for guidance_scale, generator, and num_inference_steps.
  • Propagate pipeline exceptions, including NotImplementedError, instead of silently treating failed calls as valid samples.
  • Keep diffusion SignRound calibration at micro-batch size 1 and scale gradient accumulation to preserve the effective batch size.
  • Update dual-transformer calibration to use calib_num_inference_steps.
  • Add CLI and entry-point support for --calib_num_inference_steps.
  • Update English and Chinese documentation.

Type of Change

Bug fix / performance improvement

Related Issues

Fixes or relates to #

Checklist Before Submitting

  • My code has been tested locally.
  • Documentation has been updated as needed.
  • New or updated tests are included where applicable.
  • The CUDA CI has passed. You can trigger it by commenting /azp run Unit-Test-CUDA-AutoRound.

@changwangss
changwangss force-pushed the feat/diffusion-calib-step-sampling branch from eeecc2a to bd4e0d4 Compare August 31, 2026 13:38
Signed-off-by: changwangss <chang1.wang@intel.com>
@changwangss
changwangss force-pushed the feat/diffusion-calib-step-sampling branch from bd4e0d4 to a680a89 Compare August 31, 2026 14:21
@changwangss
changwangss marked this pull request as ready for review September 1, 2026 06:34
@AutoRoundBot

Copy link
Copy Markdown
Collaborator

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: changwangss <chang1.wang@intel.com>
Signed-off-by: changwangss <chang1.wang@intel.com>
Signed-off-by: changwangss <chang1.wang@intel.com>
@AutoRoundBot

Copy link
Copy Markdown
Collaborator

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: changwangss <chang1.wang@intel.com>
@AutoRoundBot

Copy link
Copy Markdown
Collaborator

/azp run Unit-Test-CUDA-AutoRound

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@lvliang-intel lvliang-intel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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.

3 participants