[diffusion] profile: support performance metric dumping and comparison (#13630)
This commit is contained in:
@@ -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"
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user