Skip to content

Error(s) in loading state_dict for NextDiT #417

Description

@makisekurisu-jp
Image
(venv) PS D:\ComfyUI> cd custom_nodes\ComfyUI-GGUF\tools
(venv) PS D:\ComfyUI\custom_nodes\ComfyUI-GGUF\tools> python convert.py --src D:\ComfyUI\models\diffusion_models\Beyond_Reality_Super-Z-Image_3.0-BF16.safetensors
cap_embedder.0.weight                         torch.bfloat16 --> F32, shape = {2560}
cap_embedder.1.bias                           torch.bfloat16 --> F32, shape = {3840}
cap_embedder.1.weight                         torch.bfloat16 --> BF16, shape = {5120, 3840}
cap_pad_token                                 torch.bfloat16 --> BF16, shape = {7680, 1}
context_refiner.0.attention.k_norm.weight     torch.bfloat16 --> F32, shape = {128}
context_refiner.0.attention.out.weight        torch.bfloat16 --> BF16, shape = {7680, 3840}
context_refiner.0.attention.q_norm.weight     torch.bfloat16 --> F32, shape = {128}
context_refiner.0.attention.qkv.weight        torch.bfloat16 --> BF16, shape = {7680, 11520}
context_refiner.0.attention_norm1.weight      torch.bfloat16 --> F32, shape = {3840}
context_refiner.0.attention_norm2.weight      torch.bfloat16 --> F32, shape = {3840}
context_refiner.0.feed_forward.w1.weight      torch.bfloat16 --> BF16, shape = {7680, 10240}
context_refiner.0.feed_forward.w2.weight      torch.bfloat16 --> BF16, shape = {20480, 3840}
context_refiner.0.feed_forward.w3.weight      torch.bfloat16 --> BF16, shape = {7680, 10240}
context_refiner.0.ffn_norm1.weight            torch.bfloat16 --> F32, shape = {3840}
context_refiner.0.ffn_norm2.weight            torch.bfloat16 --> F32, shape = {3840}
context_refiner.1.attention.k_norm.weight     torch.bfloat16 --> F32, shape = {128}
context_refiner.1.attention.out.weight        torch.bfloat16 --> BF16, shape = {7680, 3840}
context_refiner.1.attention.q_norm.weight     torch.bfloat16 --> F32, shape = {128}
context_refiner.1.attention.qkv.weight        torch.bfloat16 --> BF16, shape = {7680, 11520}
context_refiner.1.attention_norm1.weight      torch.bfloat16 --> F32, shape = {3840}
context_refiner.1.attention_norm2.weight      torch.bfloat16 --> F32, shape = {3840}
context_refiner.1.feed_forward.w1.weight      torch.bfloat16 --> BF16, shape = {7680, 10240}
context_refiner.1.feed_forward.w2.weight      torch.bfloat16 --> BF16, shape = {20480, 3840}
context_refiner.1.feed_forward.w3.weight      torch.bfloat16 --> BF16, shape = {7680, 10240}
context_refiner.1.ffn_norm1.weight            torch.bfloat16 --> F32, shape = {3840}
context_refiner.1.ffn_norm2.weight            torch.bfloat16 --> F32, shape = {3840}
final_layer.adaLN_modulation.1.bias           torch.bfloat16 --> F32, shape = {3840}
final_layer.adaLN_modulation.1.weight         torch.bfloat16 --> BF16, shape = {512, 3840}
final_layer.linear.bias                       torch.bfloat16 --> F32, shape = {64}
final_layer.linear.weight                     torch.bfloat16 --> BF16, shape = {7680, 64}
layers.0.adaLN_modulation.0.bias              torch.bfloat16 --> F32, shape = {15360}
layers.0.adaLN_modulation.0.weight            torch.bfloat16 --> BF16, shape = {512, 15360}
layers.0.attention.k_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.0.attention.out.weight                 torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.0.attention.q_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.0.attention.qkv.weight                 torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.0.attention_norm1.weight               torch.bfloat16 --> F32, shape = {3840}
layers.0.attention_norm2.weight               torch.bfloat16 --> F32, shape = {3840}
layers.0.feed_forward.w1.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.0.feed_forward.w2.weight               torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.0.feed_forward.w3.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.0.ffn_norm1.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.0.ffn_norm2.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.1.adaLN_modulation.0.bias              torch.bfloat16 --> F32, shape = {15360}
layers.1.adaLN_modulation.0.weight            torch.bfloat16 --> BF16, shape = {512, 15360}
layers.1.attention.k_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.1.attention.out.weight                 torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.1.attention.q_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.1.attention.qkv.weight                 torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.1.attention_norm1.weight               torch.bfloat16 --> F32, shape = {3840}
layers.1.attention_norm2.weight               torch.bfloat16 --> F32, shape = {3840}
layers.1.feed_forward.w1.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.1.feed_forward.w2.weight               torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.1.feed_forward.w3.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.1.ffn_norm1.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.1.ffn_norm2.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.10.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.10.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.10.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.10.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.10.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.10.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.10.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.10.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.10.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.10.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.10.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.10.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.10.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.11.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.11.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.11.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.11.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.11.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.11.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.11.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.11.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.11.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.11.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.11.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.11.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.11.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.12.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.12.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.12.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.12.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.12.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.12.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.12.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.12.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.12.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.12.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.12.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.12.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.12.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.13.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.13.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.13.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.13.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.13.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.13.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.13.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.13.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.13.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.13.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.13.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.13.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.13.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.14.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.14.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.14.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.14.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.14.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.14.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.14.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.14.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.14.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.14.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.14.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.14.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.14.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.15.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.15.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.15.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.15.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.15.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.15.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.15.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.15.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.15.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.15.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.15.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.15.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.15.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.16.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.16.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.16.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.16.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.16.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.16.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.16.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.16.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.16.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.16.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.16.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.16.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.16.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.17.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.17.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.17.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.17.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.17.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.17.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.17.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.17.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.17.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.17.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.17.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.17.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.17.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.18.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.18.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.18.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.18.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.18.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.18.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.18.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.18.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.18.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.18.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.18.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.18.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.18.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.19.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.19.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.19.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.19.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.19.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.19.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.19.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.19.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.19.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.19.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.19.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.19.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.19.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.2.adaLN_modulation.0.bias              torch.bfloat16 --> F32, shape = {15360}
layers.2.adaLN_modulation.0.weight            torch.bfloat16 --> BF16, shape = {512, 15360}
layers.2.attention.k_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.2.attention.out.weight                 torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.2.attention.q_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.2.attention.qkv.weight                 torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.2.attention_norm1.weight               torch.bfloat16 --> F32, shape = {3840}
layers.2.attention_norm2.weight               torch.bfloat16 --> F32, shape = {3840}
layers.2.feed_forward.w1.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.2.feed_forward.w2.weight               torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.2.feed_forward.w3.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.2.ffn_norm1.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.2.ffn_norm2.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.20.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.20.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.20.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.20.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.20.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.20.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.20.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.20.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.20.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.20.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.20.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.20.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.20.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.21.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.21.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.21.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.21.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.21.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.21.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.21.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.21.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.21.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.21.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.21.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.21.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.21.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.22.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.22.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.22.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.22.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.22.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.22.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.22.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.22.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.22.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.22.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.22.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.22.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.22.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.23.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.23.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.23.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.23.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.23.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.23.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.23.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.23.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.23.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.23.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.23.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.23.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.23.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.24.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.24.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.24.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.24.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.24.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.24.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.24.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.24.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.24.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.24.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.24.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.24.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.24.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.25.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.25.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.25.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.25.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.25.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.25.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.25.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.25.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.25.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.25.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.25.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.25.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.25.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.26.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.26.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.26.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.26.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.26.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.26.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.26.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.26.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.26.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.26.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.26.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.26.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.26.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.27.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.27.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.27.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.27.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.27.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.27.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.27.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.27.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.27.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.27.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.27.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.27.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.27.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.28.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.28.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.28.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.28.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.28.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.28.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.28.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.28.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.28.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.28.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.28.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.28.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.28.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.29.adaLN_modulation.0.bias             torch.bfloat16 --> F32, shape = {15360}
layers.29.adaLN_modulation.0.weight           torch.bfloat16 --> BF16, shape = {512, 15360}
layers.29.attention.k_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.29.attention.out.weight                torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.29.attention.q_norm.weight             torch.bfloat16 --> F32, shape = {128}
layers.29.attention.qkv.weight                torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.29.attention_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
layers.29.attention_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
layers.29.feed_forward.w1.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.29.feed_forward.w2.weight              torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.29.feed_forward.w3.weight              torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.29.ffn_norm1.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.29.ffn_norm2.weight                    torch.bfloat16 --> F32, shape = {3840}
layers.3.adaLN_modulation.0.bias              torch.bfloat16 --> F32, shape = {15360}
layers.3.adaLN_modulation.0.weight            torch.bfloat16 --> BF16, shape = {512, 15360}
layers.3.attention.k_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.3.attention.out.weight                 torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.3.attention.q_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.3.attention.qkv.weight                 torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.3.attention_norm1.weight               torch.bfloat16 --> F32, shape = {3840}
layers.3.attention_norm2.weight               torch.bfloat16 --> F32, shape = {3840}
layers.3.feed_forward.w1.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.3.feed_forward.w2.weight               torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.3.feed_forward.w3.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.3.ffn_norm1.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.3.ffn_norm2.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.4.adaLN_modulation.0.bias              torch.bfloat16 --> F32, shape = {15360}
layers.4.adaLN_modulation.0.weight            torch.bfloat16 --> BF16, shape = {512, 15360}
layers.4.attention.k_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.4.attention.out.weight                 torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.4.attention.q_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.4.attention.qkv.weight                 torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.4.attention_norm1.weight               torch.bfloat16 --> F32, shape = {3840}
layers.4.attention_norm2.weight               torch.bfloat16 --> F32, shape = {3840}
layers.4.feed_forward.w1.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.4.feed_forward.w2.weight               torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.4.feed_forward.w3.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.4.ffn_norm1.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.4.ffn_norm2.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.5.adaLN_modulation.0.bias              torch.bfloat16 --> F32, shape = {15360}
layers.5.adaLN_modulation.0.weight            torch.bfloat16 --> BF16, shape = {512, 15360}
layers.5.attention.k_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.5.attention.out.weight                 torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.5.attention.q_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.5.attention.qkv.weight                 torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.5.attention_norm1.weight               torch.bfloat16 --> F32, shape = {3840}
layers.5.attention_norm2.weight               torch.bfloat16 --> F32, shape = {3840}
layers.5.feed_forward.w1.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.5.feed_forward.w2.weight               torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.5.feed_forward.w3.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.5.ffn_norm1.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.5.ffn_norm2.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.6.adaLN_modulation.0.bias              torch.bfloat16 --> F32, shape = {15360}
layers.6.adaLN_modulation.0.weight            torch.bfloat16 --> BF16, shape = {512, 15360}
layers.6.attention.k_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.6.attention.out.weight                 torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.6.attention.q_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.6.attention.qkv.weight                 torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.6.attention_norm1.weight               torch.bfloat16 --> F32, shape = {3840}
layers.6.attention_norm2.weight               torch.bfloat16 --> F32, shape = {3840}
layers.6.feed_forward.w1.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.6.feed_forward.w2.weight               torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.6.feed_forward.w3.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.6.ffn_norm1.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.6.ffn_norm2.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.7.adaLN_modulation.0.bias              torch.bfloat16 --> F32, shape = {15360}
layers.7.adaLN_modulation.0.weight            torch.bfloat16 --> BF16, shape = {512, 15360}
layers.7.attention.k_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.7.attention.out.weight                 torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.7.attention.q_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.7.attention.qkv.weight                 torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.7.attention_norm1.weight               torch.bfloat16 --> F32, shape = {3840}
layers.7.attention_norm2.weight               torch.bfloat16 --> F32, shape = {3840}
layers.7.feed_forward.w1.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.7.feed_forward.w2.weight               torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.7.feed_forward.w3.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.7.ffn_norm1.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.7.ffn_norm2.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.8.adaLN_modulation.0.bias              torch.bfloat16 --> F32, shape = {15360}
layers.8.adaLN_modulation.0.weight            torch.bfloat16 --> BF16, shape = {512, 15360}
layers.8.attention.k_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.8.attention.out.weight                 torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.8.attention.q_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.8.attention.qkv.weight                 torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.8.attention_norm1.weight               torch.bfloat16 --> F32, shape = {3840}
layers.8.attention_norm2.weight               torch.bfloat16 --> F32, shape = {3840}
layers.8.feed_forward.w1.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.8.feed_forward.w2.weight               torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.8.feed_forward.w3.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.8.ffn_norm1.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.8.ffn_norm2.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.9.adaLN_modulation.0.bias              torch.bfloat16 --> F32, shape = {15360}
layers.9.adaLN_modulation.0.weight            torch.bfloat16 --> BF16, shape = {512, 15360}
layers.9.attention.k_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.9.attention.out.weight                 torch.bfloat16 --> BF16, shape = {7680, 3840}
layers.9.attention.q_norm.weight              torch.bfloat16 --> F32, shape = {128}
layers.9.attention.qkv.weight                 torch.bfloat16 --> BF16, shape = {7680, 11520}
layers.9.attention_norm1.weight               torch.bfloat16 --> F32, shape = {3840}
layers.9.attention_norm2.weight               torch.bfloat16 --> F32, shape = {3840}
layers.9.feed_forward.w1.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.9.feed_forward.w2.weight               torch.bfloat16 --> BF16, shape = {20480, 3840}
layers.9.feed_forward.w3.weight               torch.bfloat16 --> BF16, shape = {7680, 10240}
layers.9.ffn_norm1.weight                     torch.bfloat16 --> F32, shape = {3840}
layers.9.ffn_norm2.weight                     torch.bfloat16 --> F32, shape = {3840}
noise_refiner.0.adaLN_modulation.0.bias       torch.bfloat16 --> F32, shape = {15360}
noise_refiner.0.adaLN_modulation.0.weight     torch.bfloat16 --> BF16, shape = {512, 15360}
noise_refiner.0.attention.k_norm.weight       torch.bfloat16 --> F32, shape = {128}
noise_refiner.0.attention.out.weight          torch.bfloat16 --> BF16, shape = {7680, 3840}
noise_refiner.0.attention.q_norm.weight       torch.bfloat16 --> F32, shape = {128}
noise_refiner.0.attention.qkv.weight          torch.bfloat16 --> BF16, shape = {7680, 11520}
noise_refiner.0.attention_norm1.weight        torch.bfloat16 --> F32, shape = {3840}
noise_refiner.0.attention_norm2.weight        torch.bfloat16 --> F32, shape = {3840}
noise_refiner.0.feed_forward.w1.weight        torch.bfloat16 --> BF16, shape = {7680, 10240}
noise_refiner.0.feed_forward.w2.weight        torch.bfloat16 --> BF16, shape = {20480, 3840}
noise_refiner.0.feed_forward.w3.weight        torch.bfloat16 --> BF16, shape = {7680, 10240}
noise_refiner.0.ffn_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
noise_refiner.0.ffn_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
noise_refiner.1.adaLN_modulation.0.bias       torch.bfloat16 --> F32, shape = {15360}
noise_refiner.1.adaLN_modulation.0.weight     torch.bfloat16 --> BF16, shape = {512, 15360}
noise_refiner.1.attention.k_norm.weight       torch.bfloat16 --> F32, shape = {128}
noise_refiner.1.attention.out.weight          torch.bfloat16 --> BF16, shape = {7680, 3840}
noise_refiner.1.attention.q_norm.weight       torch.bfloat16 --> F32, shape = {128}
noise_refiner.1.attention.qkv.weight          torch.bfloat16 --> BF16, shape = {7680, 11520}
noise_refiner.1.attention_norm1.weight        torch.bfloat16 --> F32, shape = {3840}
noise_refiner.1.attention_norm2.weight        torch.bfloat16 --> F32, shape = {3840}
noise_refiner.1.feed_forward.w1.weight        torch.bfloat16 --> BF16, shape = {7680, 10240}
noise_refiner.1.feed_forward.w2.weight        torch.bfloat16 --> BF16, shape = {20480, 3840}
noise_refiner.1.feed_forward.w3.weight        torch.bfloat16 --> BF16, shape = {7680, 10240}
noise_refiner.1.ffn_norm1.weight              torch.bfloat16 --> F32, shape = {3840}
noise_refiner.1.ffn_norm2.weight              torch.bfloat16 --> F32, shape = {3840}
t_embedder.mlp.0.bias                         torch.bfloat16 --> F32, shape = {1024}
t_embedder.mlp.0.weight                       torch.bfloat16 --> BF16, shape = {512, 1024}
t_embedder.mlp.2.bias                         torch.bfloat16 --> F32, shape = {256}
t_embedder.mlp.2.weight                       torch.bfloat16 --> BF16, shape = {2048, 256}
x_embedder.bias                               torch.bfloat16 --> F32, shape = {3840}
x_embedder.weight                             torch.bfloat16 --> BF16, shape = {128, 3840}
x_pad_token                                   torch.bfloat16 --> BF16, shape = {7680, 1}
100%|████████████████████████████████████████████████████████████████████████████████| 453/453 [00:45<00:00, 10.03it/s]
Writing: 100%|██████████████████████████████████████████████████████████████████| 12.3G/12.3G [00:34<00:00, 357Mbyte/s]
(venv) PS D:\ComfyUI\custom_nodes\ComfyUI-GGUF\tools>

Activity

  1. makisekurisu-jp commented on Feb 9, 2026

    @makisekurisu-jp
    Author

    @city96 I need your help, please🙏

  2. qskousen commented on Feb 21, 2026

    @qskousen

    I just discussed this in #419

    x_pad_token and cap_pad_token can't be BF16, though I am not sure of the reason. If you downcast them to FP16 (with some precision loss) or upcast them to FP32, then it should work fine.

  3. makisekurisu-jp commented on Mar 3, 2026

    @makisekurisu-jp
    Author
  4. 82sound-jpg commented on Mar 12, 2026

    @82sound-jpg

    我在使用zimage base q4km 和q80时候也出现这个错误

  5. pizzadelivery01 commented on Aug 23, 2026

    @pizzadelivery01

    Adding a data point to this issue — I hit the same thing converting a Z-Image finetune (NextDiT) and traced it two layers deep.

    Setup

    • ComfyUI on current main, ComfyUI-GGUF on current main (6ea2651)
    • ComfyUI-GGUF/tools at current main, llama.cpp @ b3962 + lcpp.patch
    • Source: Z-Image finetune from Civitai, diffusion model extracted via ModelSave, BF16 safetensors
    • Quantized to Q6_K (11741 MB -> 5636 MB)
    • Text encoder: qwen_4b_fp8_scaled.safetensors (not a GGUF encoder)
    • RTX 5080, torch 2.11.0+cu128, Linux/WSL2

    Problem 1 — load fails on pad tokens

    UnetLoaderGGUF:

    RuntimeError: Error(s) in loading state_dict for NextDiT:
      size mismatch for x_pad_token: copying a param with shape torch.Size([3840]) from checkpoint, the shape in current model is torch.Size([1, 3840]).
      size mismatch for cap_pad_token: copying a param with shape torch.Size([3840]) from checkpoint, the shape in current model is torch.Size([1, 3840]).
    

    Both tensors are [1, 3840] in the source. GGUF drops the trailing dim-1, and convert.py does not emit comfy.gguf.orig_shape.* for them, so the loader reconstructs [3840].

    Problem 2 — patching orig_shape moves the failure downstream

    I rewrote the quantized GGUF adding comfy.gguf.orig_shape.x_pad_token = [1, 3840] and the same for cap_pad_token, leaving all tensor data byte-identical (verified: 0 shape mismatches against the original across all 453 tensors).

    That clears the load. Sampling then fails:

    KSampler
    RuntimeError: Sizes of tensors must match except in dimension 1.
    Expected size 3840 but got size 7680 for tensor number 1 in the list.
    

    7680 is 2x 3840. Stored state is consistent as far as I can inspect it — both tensors report shape [3840], type 30 (BF16), data.shape == (7680,), which is the correct byte count for 3840 BF16 elements.

    Control

    Same workflow, same fp8 text encoder, Load Diffusion Model with the original BF16 safetensors instead of the GGUF loader: renders fine. The only variable is the unet loader.

    So the metadata patch is not the fix — declaring [1, 3840] satisfies load_state_dict but something downstream still reads 7680, and declaring [3840] is equivalent to no metadata at all. Both states fail, just in different places.

    Happy to share the conversion log, the patched file, or test a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions