diff --git a/python/sglang/multimodal_gen/docs/profiling.md b/python/sglang/multimodal_gen/docs/profiling.md index 7d039557f..cf7ddc215 100644 --- a/python/sglang/multimodal_gen/docs/profiling.md +++ b/python/sglang/multimodal_gen/docs/profiling.md @@ -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 diff --git a/python/sglang/multimodal_gen/runtime/utils/perf_logger.py b/python/sglang/multimodal_gen/runtime/utils/perf_logger.py index 2afa203fc..d76233696 100644 --- a/python/sglang/multimodal_gen/runtime/utils/perf_logger.py +++ b/python/sglang/multimodal_gen/runtime/utils/perf_logger.py @@ -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 {}, }