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

Class ModelHyVid

tools/convert.py:75–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73 keys_ignore = ["_extra_state", "accum_"]
74
75class ModelHyVid(ModelTemplate):
76 arch = "hyvid"
77 keys_detect = [
78 (
79 "double_blocks.0.img_attn_proj.weight",
80 "txt_in.individual_token_refiner.blocks.1.self_attn_qkv.weight",
81 )
82 ]
83
84 def handle_nd_tensor(self, key, data):
85 # hacky but don't have any better ideas
86 path = f"./fix_5d_tensors_{self.arch}.safetensors" # TODO: somehow get a path here??
87 if os.path.isfile(path):
88 raise RuntimeError(f"5D tensor fix file already exists! {path}")
89 fsd = {key: torch.from_numpy(data)}
90 tqdm.write(f"5D key found in state dict! Manual fix required! - {key} {data.shape}")
91 save_file(fsd, path)
92
93class ModelWan(ModelHyVid):
94 arch = "wan"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected