sgl-project/sglang · error · ValueError

SANA-WM does not support tensor parallelism yet. Use --num-g

Error message

SANA-WM does not support tensor parallelism yet. Use --num-gpus with FSDP/CFG parallelism instead of --tp-size {tp_size}.

What it means

Raised by SANA-WM's _validate_parallelism_args during create_pipeline_stages when server_args.tp_size != 1. The watermarker/world-model pipeline has no tensor-parallel implementation yet; the message directs users to multi-GPU FSDP/CFG parallelism via --num-gpus instead.

Source

Thrown at python/sglang/multimodal_gen/runtime/pipelines/sana_wm_pipeline.py:67

    """SANA-WM TI2V pipeline (single-stage)."""

    pipeline_name = "SanaWMPipeline"
    pipeline_config_cls = SanaWMPipelineConfig
    sampling_params_cls = SanaWMSamplingParams

    _required_config_modules = [
        "text_encoder",
        "tokenizer",
        "vae",
        "transformer",
        "scheduler",
    ]

    @staticmethod
    def _validate_parallelism_args(server_args: ServerArgs) -> None:
        tp_size = getattr(server_args, "tp_size", 1) or 1
        if tp_size != 1:
            raise ValueError(
                "SANA-WM does not support tensor parallelism yet. "
                "Use --num-gpus with FSDP/CFG parallelism instead of "
                f"--tp-size {tp_size}."
            )

        sp_degree = getattr(server_args, "sp_degree", 1) or 1
        if sp_degree != 1:
            raise ValueError(
                "SANA-WM does not support temporal sequence parallelism yet. "
                "Stage-1 GDN/GLUMBConvTemp span frames and require halo/state "
                "exchange before latents can be sharded. Use --num-gpus with "
                "FSDP/CFG parallelism instead of "
                f"--sp-degree {sp_degree}."
            )

    def create_pipeline_stages(self, server_args: ServerArgs):
        self._validate_parallelism_args(server_args)
        self.add_stage(InputValidationStage())

View on GitHub (pinned to 0132848349)

Solutions

  1. Set --tp-size 1 (or omit it) and use --num-gpus with FSDP/CFG parallelism for multi-GPU scaling
  2. Update cluster/Helm templates to strip TP flags for SANA-WM jobs
  3. Watch for upstream TP support before re-enabling the flag

Example fix

# before
--tp-size 4 --model sana-wm

# after
--tp-size 1 --num-gpus 4 --model sana-wm
Defensive patterns

Strategy: validation

Validate before calling

tp = getattr(server_args, 'tp_size', 1) or 1
if tp != 1:
    raise SystemExit('SANA-WM: set --tp-size 1; scale with --num-gpus/FSDP instead')

Prevention

When it happens

Trigger: Launching the SANA-WM pipeline with --tp-size 2/4/8; cluster templates that default tp_size > 1 for all models; calling _validate_parallelism_args directly with a TP-configured ServerArgs (as the tests do).

Common situations: Shared GPU-cluster launch presets with TP baked in; assuming all sglang pipelines support TP; migrating a TP deployment to SANA-WM.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/f1f1155cdd34be31. Report an issue: GitHub.