[Diffusion] Fix get model name when model local path end with "/" (#18918)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user