[diffusion] profile: support performance metric dumping and comparison (#13630)

This commit is contained in:
Mick
2025-11-21 18:47:16 +08:00
committed by GitHub
parent a34d3abb54
commit 5e7f91d451
20 changed files with 1315 additions and 1148 deletions
+6 -4
View File
@@ -12,6 +12,8 @@ import diffusers
import torch
from packaging import version
from sglang.multimodal_gen.runtime.utils.common import get_bool_env_var
logger = logging.getLogger(__name__)
if TYPE_CHECKING:
@@ -277,13 +279,13 @@ environment_variables: dict[str, Callable[[], Any]] = {
# If set, sgl_diffusion will run in development mode, which will enable
# some additional endpoints for developing and debugging,
# e.g. `/reset_prefix_cache`
"SGLANG_DIFFUSION_SERVER_DEV_MODE": lambda: bool(
int(os.getenv("SGLANG_DIFFUSION_SERVER_DEV_MODE", "0"))
"SGLANG_DIFFUSION_SERVER_DEV_MODE": lambda: get_bool_env_var(
"SGLANG_DIFFUSION_SERVER_DEV_MODE"
),
# If set, sgl_diffusion will enable stage logging, which will print the time
# taken for each stage
"SGLANG_DIFFUSION_STAGE_LOGGING": lambda: bool(
int(os.getenv("SGLANG_DIFFUSION_STAGE_LOGGING", "0"))
"SGLANG_DIFFUSION_STAGE_LOGGING": lambda: get_bool_env_var(
"SGLANG_DIFFUSION_STAGE_LOGGING"
),
}