(cls, arch)
| 306 | |
| 307 | @classmethod |
| 308 | def from_model_architecture(cls, arch): |
| 309 | try: |
| 310 | return cls._model_classes[arch] |
| 311 | except KeyError: |
| 312 | raise NotImplementedError(f'Architecture {arch!r} not supported!') from None |
| 313 | |
| 314 | def _is_model_safetensors(self) -> bool: |
| 315 | return Model.count_model_parts(self.dir_model, ".safetensors") > 0 |