Add adapter_model.safetensors to corruption validation for LoRA (#14022)
This commit is contained in:
@@ -393,7 +393,12 @@ def find_local_hf_snapshot_dir(
|
|||||||
for f in local_weight_files:
|
for f in local_weight_files:
|
||||||
base_name = os.path.basename(f)
|
base_name = os.path.basename(f)
|
||||||
# Check if this is a single model file (not sharded)
|
# Check if this is a single model file (not sharded)
|
||||||
if base_name in ["model.safetensors", "pytorch_model.safetensors"]:
|
# Include adapter_model.safetensors for LoRA adapters
|
||||||
|
if base_name in [
|
||||||
|
"model.safetensors",
|
||||||
|
"pytorch_model.safetensors",
|
||||||
|
"adapter_model.safetensors",
|
||||||
|
]:
|
||||||
if not _validate_safetensors_file(f):
|
if not _validate_safetensors_file(f):
|
||||||
logger.info(
|
logger.info(
|
||||||
"Corrupted model file %s for %s. "
|
"Corrupted model file %s for %s. "
|
||||||
|
|||||||
Reference in New Issue
Block a user