[diffusion] optimization: enable channels_last_3d for Cosmos3 VAE (#28021)
Co-authored-by: Mick Qian <mickqian@users.noreply.github.com>
This commit is contained in:
@@ -9,6 +9,7 @@ from safetensors.torch import save_file as safetensors_save_file
|
||||
|
||||
from sglang.multimodal_gen import envs
|
||||
from sglang.multimodal_gen.configs.models.vaes.base import VAEConfig
|
||||
from sglang.multimodal_gen.configs.pipeline_configs.cosmos3 import Cosmos3Config
|
||||
from sglang.multimodal_gen.configs.pipeline_configs.ltx_2 import LTX2PipelineConfig
|
||||
from sglang.multimodal_gen.configs.pipeline_configs.qwen_image import (
|
||||
QwenImagePipelineConfig,
|
||||
@@ -155,7 +156,10 @@ def _should_use_channels_last_3d(
|
||||
if isinstance(pipeline_config, QwenImagePipelineConfig):
|
||||
return True
|
||||
if (
|
||||
isinstance(pipeline_config, (WanT2V480PConfig, LTX2PipelineConfig))
|
||||
isinstance(
|
||||
pipeline_config,
|
||||
(WanT2V480PConfig, LTX2PipelineConfig, Cosmos3Config),
|
||||
)
|
||||
and server_args.num_gpus == 1
|
||||
):
|
||||
return True
|
||||
|
||||
@@ -40,7 +40,7 @@ logger = init_logger(__name__)
|
||||
# NPU/ascend) is read from sgl-project/ci-data-diffusion, where the GT-gen workflows
|
||||
# publish.
|
||||
SGL_TEST_FILES_CI_DATA_REPO = "sgl-project/ci-data-diffusion"
|
||||
SGL_TEST_FILES_CI_DATA_REVISION = "972007201d82d7dcce9e35b7e4b151c2b1181c30"
|
||||
SGL_TEST_FILES_CI_DATA_REVISION = "17312c8df37e65bffe75818884bc2a5c93cf3094"
|
||||
|
||||
# The NPU pin is kept as a separate branch so ascend GT can be bumped independently
|
||||
# when it's regenerated on its own cadence.
|
||||
|
||||
@@ -10,6 +10,7 @@ from safetensors.torch import save_file as safetensors_save_file
|
||||
from sglang.multimodal_gen.configs.models.vaes.minimax_h3_audio import (
|
||||
MiniMaxH3AudioVAEConfig,
|
||||
)
|
||||
from sglang.multimodal_gen.configs.pipeline_configs.cosmos3 import Cosmos3Config
|
||||
from sglang.multimodal_gen.configs.pipeline_configs.ltx_2 import LTX2PipelineConfig
|
||||
from sglang.multimodal_gen.configs.pipeline_configs.qwen_image import (
|
||||
QwenImagePipelineConfig,
|
||||
@@ -655,6 +656,9 @@ class TestVAELoader(unittest.TestCase):
|
||||
(Wan2_2_I2V_A14B_Config, 2, "video_vae", False),
|
||||
(LTX2PipelineConfig, 1, "video_vae", True),
|
||||
(LTX2PipelineConfig, 2, "video_vae", False),
|
||||
(Cosmos3Config, 1, "vae", True),
|
||||
(Cosmos3Config, 1, "video_vae", True),
|
||||
(Cosmos3Config, 2, "video_vae", False),
|
||||
]
|
||||
with (
|
||||
patch.dict("os.environ", {}, clear=True),
|
||||
|
||||
Reference in New Issue
Block a user