Closed LittleLittleCloud closed 1 month ago
In load_checkpoint API, the strict is not passed to the inner call towards load_safetensor, so if the checkpoint is safetensor, the loading process will always be in strict mode
load_checkpoint
strict
load_safetensor
https://github.com/shaltielshmid/TorchSharp.PyBridge/blob/74fb29feb3fca2c0700e49dc836a94b9cb6881b3/TorchSharp.PyBridge/PyBridgeModuleExtensions.cs#L311C115-L311C122
Great catch! Version 1.4.3 should be published on NuGet soon. Can you confirm that the new version works for you?
In
load_checkpoint
API, thestrict
is not passed to the inner call towardsload_safetensor
, so if the checkpoint is safetensor, the loading process will always be in strict modehttps://github.com/shaltielshmid/TorchSharp.PyBridge/blob/74fb29feb3fca2c0700e49dc836a94b9cb6881b3/TorchSharp.PyBridge/PyBridgeModuleExtensions.cs#L311C115-L311C122