MCPcopy
hub / github.com/city96/ComfyUI-GGUF / is_model_arch

Function is_model_arch

tools/convert.py:151–161  ·  view source on GitHub ↗
(model, state_dict)

Source from the content-addressed store, hash-verified

149 ModelLTXV, ModelHyVid, ModelWan, ModelSDXL, ModelSD1, ModelLumina2]
150
151def is_model_arch(model, state_dict):
152 # check if model is correct
153 matched = False
154 invalid = False
155 for match_list in model.keys_detect:
156 if all(key in state_dict for key in match_list):
157 matched = True
158 invalid = any(key in state_dict for key in model.keys_banned)
159 break
160 assert not invalid, "Model architecture not allowed for conversion! (i.e. reference VS diffusers format)"
161 return matched
162
163def detect_arch(state_dict):
164 model_arch = None

Callers 1

detect_archFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected