[diffusion] fix: cache dit with parallel (#15163)

Co-authored-by: Mick <mickjagger19@icloud.com>
This commit is contained in:
Xiaoyu Zhang
2025-12-15 19:15:51 +08:00
committed by GitHub
co-authored by Mick
parent bf6438142a
commit 92c29d43ac
3 changed files with 177 additions and 7 deletions
@@ -8,6 +8,7 @@ import argparse
import dataclasses
import inspect
import json
import os
import random
import sys
import tempfile
@@ -956,6 +957,15 @@ class ServerArgs:
"CFG Parallelism is enabled via `--enable-cfg-parallel`, while -num-gpus==1"
)
if os.getenv("SGLANG_CACHE_DIT_ENABLED", "").lower() == "true":
has_sp = self.sp_degree > 1
has_tp = self.tp_size > 1
if has_sp and has_tp:
raise ValueError(
"cache-dit does not support hybrid parallelism (SP + TP). "
"Please use either sequence parallelism or tensor parallelism, not both."
)
@dataclasses.dataclass
class PortArgs: