| 13 | MAX_TENSOR_DIMS = 4 |
| 14 | |
| 15 | class ModelTemplate: |
| 16 | arch = "invalid" # string describing architecture |
| 17 | shape_fix = False # whether to reshape tensors |
| 18 | keys_detect = [] # list of lists to match in state dict |
| 19 | keys_banned = [] # list of keys that should mark model as invalid for conversion |
| 20 | keys_hiprec = [] # list of keys that need to be kept in fp32 for some reason |
| 21 | keys_ignore = [] # list of strings to ignore keys by when found |
| 22 | |
| 23 | def handle_nd_tensor(self, key, data): |
| 24 | raise NotImplementedError(f"Tensor detected that exceeds dims supported by C++ code! ({key} @ {data.shape})") |
| 25 | |
| 26 | class ModelFlux(ModelTemplate): |
| 27 | arch = "flux" |
nothing calls this directly
no outgoing calls
no test coverage detected