(in_path: str)
| 100 | |
| 101 | |
| 102 | def load_safetensors(in_path: str): |
| 103 | if os.path.isdir(in_path): |
| 104 | return load_safetensors_from_dir(in_path) |
| 105 | elif os.path.isfile(in_path): |
| 106 | return load_safetensors_from_path(in_path) |
| 107 | else: |
| 108 | raise ValueError(f'{in_path} does not exist') |
| 109 | |
| 110 | |
| 111 | def load_safetensors_from_path(in_path: str): |
no test coverage detected