fixed amd multimodal CI failures caused by refactor in #15812 #15813 (#16287)

This commit is contained in:
sunxxuns
2026-01-02 14:55:42 -08:00
committed by GitHub
parent b7c7e03d93
commit 30cfb687fa
5 changed files with 86 additions and 29 deletions

View File

@@ -41,6 +41,7 @@ from transformers import AutoConfig, PretrainedConfig
from transformers.models.auto.modeling_auto import MODEL_FOR_CAUSAL_LM_MAPPING_NAMES
from sglang.multimodal_gen.runtime.loader.weight_utils import get_lock
from sglang.multimodal_gen.runtime.platforms import current_platform
from sglang.multimodal_gen.runtime.utils.logging_utils import init_logger
logger = init_logger(__name__)
@@ -230,6 +231,12 @@ def maybe_download_lora(
return local_path
weight_name = _best_guess_weight_name(local_path, file_extension=".safetensors")
# AMD workaround: PR 15813 changed from model_name_or_path to local_path,
# which can return None. Fall back to original behavior on ROCm.
if weight_name is None and current_platform.is_rocm():
weight_name = _best_guess_weight_name(
model_name_or_path, file_extension=".safetensors"
)
return os.path.join(local_path, weight_name)