From 47d485f35f39a5e9faebc314bbd2759345dd9bbe Mon Sep 17 00:00:00 2001 From: Mick Date: Tue, 13 Jan 2026 09:29:07 +0800 Subject: [PATCH] [diffusion] fix: fix not respecting dit_layerwise_offload server arg (#16252) --- python/sglang/multimodal_gen/runtime/server_args.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/sglang/multimodal_gen/runtime/server_args.py b/python/sglang/multimodal_gen/runtime/server_args.py index e055f5f3b..4ad8ed2b0 100644 --- a/python/sglang/multimodal_gen/runtime/server_args.py +++ b/python/sglang/multimodal_gen/runtime/server_args.py @@ -943,7 +943,10 @@ class ServerArgs: if not envs.SGLANG_CACHE_DIT_ENABLED: # TODO: need a better way to tell this - if "wan" in self.pipeline_config.__class__.__name__.lower(): + if ( + "wan" in self.pipeline_config.__class__.__name__.lower() + and self.dit_layerwise_offload is None + ): logger.info( "Automatically enable dit_layerwise_offload for Wan for best performance" )