[Diffusion] Fix get model name when model local path end with "/" (#18918)

This commit is contained in:
Makcum888e
2026-02-17 13:19:54 +03:00
committed by GitHub
parent f6cc02489f
commit 5f81ec1ad5

View File

@@ -236,7 +236,7 @@ def register_configs(
def get_model_short_name(model_id: str) -> str:
if "/" in model_id:
return model_id.split("/")[-1]
return model_id.rstrip("/").split("/")[-1]
else:
return model_id