Add compat mode pig

closes #230
This commit is contained in:
City
2025-03-16 19:38:40 +01:00
parent 5aa6e98ad7
commit 4aebf1bf2c
+7
View File
@@ -73,9 +73,16 @@ def gguf_sd_loader(path, handle_prefix="model.diffusion_model.", return_arch=Fal
from .tools.convert import detect_arch
arch_str = detect_arch(set(val[0] for val in tensors)).arch
compat = "sd.cpp"
elif arch_str in ["pig"]:
from .tools.convert import detect_arch
arch_str = detect_arch(set(val[0] for val in tensors)).arch
compat = "pig"
elif arch_str not in IMG_ARCH_LIST and arch_str not in TXT_ARCH_LIST:
raise ValueError(f"Unexpected architecture type in GGUF file: {arch_str!r}")
if compat:
print(f"Warning: This model file is loaded in compatibility mode '{compat}' [arch:{arch_str}]")
# main loading loop
state_dict = {}
qtype_dict = {}