MCPcopy Create free account
hub / github.com/city96/ComfyUI-GGUF / ModelTemplate

Class ModelTemplate

tools/convert.py:15–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13MAX_TENSOR_DIMS = 4
14
15class 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
26class ModelFlux(ModelTemplate):
27 arch = "flux"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected