mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-21 13:48:46 +00:00
improve load_from_safetensors typing
This commit is contained in:
parent
1de567590b
commit
b4ee65b9b1
|
@ -42,7 +42,7 @@ class Module(TorchModule):
|
|||
def __setattr__(self, name: str, value: Any) -> None:
|
||||
return super().__setattr__(name, value)
|
||||
|
||||
def load_from_safetensors(self, tensors_path: str | Path, strict: bool = True) -> "Module":
|
||||
def load_from_safetensors(self: T, tensors_path: str | Path, strict: bool = True) -> T:
|
||||
"""Load the module's state from a SafeTensors file.
|
||||
|
||||
Args:
|
||||
|
|
Loading…
Reference in a new issue