refactor: Rename LoraScanner methods for consistency and remove deprecated checkpoint methods

This commit is contained in:
Will Miao
2025-07-24 06:25:33 +08:00
parent bf9aa9356b
commit cf9fd2d5c2
4 changed files with 12 additions and 38 deletions

View File

@@ -23,17 +23,4 @@ class CheckpointScanner(ModelScanner):
def get_model_roots(self) -> List[str]:
"""Get checkpoint root directories"""
return config.base_models_roots
# Checkpoint-specific hash index functionality
def has_checkpoint_hash(self, sha256: str) -> bool:
"""Check if a checkpoint with given hash exists"""
return self.has_hash(sha256)
def get_checkpoint_path_by_hash(self, sha256: str) -> str:
"""Get file path for a checkpoint by its hash"""
return self.get_path_by_hash(sha256)
def get_checkpoint_hash_by_path(self, file_path: str) -> str:
"""Get hash for a checkpoint by its file path"""
return self.get_hash_by_path(file_path)
return config.base_models_roots