[diffusion] profiling: simplify --perf-dump-path JSON output (remove duplicate denoise steps) (#15537)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -67,6 +67,8 @@ Besides profiler traces, you can also dump a lightweight JSON report that contai
|
||||
|
||||
This is useful to quickly identify which stage dominates end-to-end latency, and whether denoising steps have uniform runtimes (and if not, which step has an abnormal spike).
|
||||
|
||||
The dumped JSON contains a `denoise_steps_ms` field formatted as an array of objects, each with a `step` key (the step index) and a `duration_ms` key.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -207,10 +207,9 @@ class PerformanceLogger:
|
||||
for name, duration_ms in timings.stages.items()
|
||||
]
|
||||
|
||||
denoise_steps_ms = list(timings.steps)
|
||||
denoise_steps = [
|
||||
{"index": idx, "duration_ms": duration_ms}
|
||||
for idx, duration_ms in enumerate(denoise_steps_ms)
|
||||
denoise_steps_ms = [
|
||||
{"step": idx, "duration_ms": duration_ms}
|
||||
for idx, duration_ms in enumerate(timings.steps)
|
||||
]
|
||||
|
||||
report = {
|
||||
@@ -221,7 +220,6 @@ class PerformanceLogger:
|
||||
"total_duration_ms": timings.total_duration_ms,
|
||||
"steps": formatted_steps,
|
||||
"denoise_steps_ms": denoise_steps_ms,
|
||||
"denoise_steps": denoise_steps,
|
||||
"meta": meta or {},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user