Skip to content

Commit dd61633

Browse files
authored
Minor fix to validate checkpoint with model state instead of state (#962)
1 parent 376125d commit dd61633

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

micro_sam/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def get_sam_model(
394394
# To get the model weights, we prioritize having the correct 'checkpoint_path' over 'model_type'
395395
# It is done to avoid strange parameter mismatch issues while incompatible model type and weights combination.
396396
from micro_sam.models.build_sam import _validate_model_type
397-
_provided_model_type = _validate_model_type(state)
397+
_provided_model_type = _validate_model_type(model_state)
398398

399399
# Verify whether the 'abbreviated_model_type' matches the '_provided_model_type'
400400
# Otherwise replace 'abbreviated_model_type' with the later.

0 commit comments

Comments
 (0)