2 Commits
Author SHA1 Message Date
wailovet 997daf65f0 'update' 2024-07-11 13:08:45 +08:00
wailovet dd93eb32e7 'update' 2024-07-11 01:29:59 +08:00
4 changed files with 15 additions and 4 deletions
+1
View File
@@ -162,3 +162,4 @@ cython_debug/
#.idea/
exclude.txt
copytoww.bat
train_tools
+2
View File
@@ -42,9 +42,11 @@ https://huggingface.co/Kijai/ChatGLM3-safetensors/tree/main
## FAQ
Error occurred when executing MZ_ChatGLM3Loader: 'ChatGLMModel' object has no attribute 'transformer'
检查ChatGLM3Loader节点选择的模型是否已经正确下载
RuntimeError: Only Tensors of floating point dtype can require gradients
尝试使用fp16版本的模型: https://huggingface.co/Kijai/ChatGLM3-safetensors/blob/main/chatglm3-fp16.safetensors
## Star History
+3 -3
View File
@@ -36,9 +36,9 @@ class MZ_FakeCond:
return mz_kolors_core.MZ_FakeCond_call(kwargs)
# NODE_CLASS_MAPPINGS["MZ_FakeCond"] = MZ_FakeCond
# NODE_DISPLAY_NAME_MAPPINGS[
# "MZ_FakeCond"] = f"{AUTHOR_NAME} - FakeCond"
NODE_CLASS_MAPPINGS["MZ_FakeCond"] = MZ_FakeCond
NODE_DISPLAY_NAME_MAPPINGS[
"MZ_FakeCond"] = f"{AUTHOR_NAME} - FakeCond"
class MZ_ChatGLM3Loader:
+9 -1
View File
@@ -212,11 +212,19 @@ def load_unet_state_dict(sd): # load unet in diffusers or regular format
def MZ_KolorsUNETLoader_call(kwargs):
from . import hook_comfyui
with hook_comfyui.apply_kolors():
# with hook_comfyui.apply_kolors():
if True:
unet_name = kwargs.get("unet_name")
unet_path = folder_paths.get_full_path("unet", unet_name)
import comfy.utils
sd = comfy.utils.load_torch_file(unet_path)
comfy.mz_log("add_embedding.linear_1.weight", sd["add_embedding.linear_1.weight"])
# add_embedding_linear_1_weight : torch.Size([1280, 5632])
add_embedding_linear_1_weight = sd["add_embedding.linear_1.weight"]
# new_add_embedding_linear_1_weight : torch.Size([1280, 2816])
new_add_embedding_linear_1_weight = add_embedding_linear_1_weight[:, :2816]
sd["add_embedding.linear_1.weight"] = new_add_embedding_linear_1_weight
model, hid_proj = load_unet_state_dict(sd)
if model is None:
raise RuntimeError(