[diffusion] refactor: centralize hardware platform detection and streamline environment variable management (#15842)
This commit is contained in:
@@ -341,7 +341,9 @@ def initialize_model_parallel(
|
||||
"""
|
||||
|
||||
if backend is None:
|
||||
backend = envs.get_torch_distributed_backend()
|
||||
from sglang.multimodal_gen.runtime.platforms import current_platform
|
||||
|
||||
backend = current_platform.get_torch_distributed_backend_str()
|
||||
# Get world size and rank. Ensure some consistencies.
|
||||
assert torch.distributed.is_initialized()
|
||||
world_size: int = torch.distributed.get_world_size()
|
||||
|
||||
Reference in New Issue
Block a user