Skip to content

[BUG?] Z Image Base safetensors model load errors - tensors wrong shape #2435

Description

@alex-ie

Describe the Issue
I am trying to investigate leejet/stable-diffusion.cpp#1488 ([Bug] Z-Image Base GGUF checkpoints produce blank white images in stable-diffusion.cpp CUDA builds #1488) which I have experienced using kcpp 1.120.

I have downloaded original weights to test with them : https://huggingface.co/Tongyi-MAI/Z-Image/resolve/main/transformer/diffusion_pytorch_model-00001-of-00002.safetensors.

Now at model load time I get errors,r e.g. context_refiner.0.attention.qkv.weight ...got [3840,3840,1,1] expected [3840,4096,1,1]

This is my first time trying to load safetensors as main SD model, I assumed if vae / clip can be safetensors for kcpp, main model can be too and launcher allow to select it.

Back to ZiB: leejet quant has (per --analyze) context_refiner.0.attention.qkv.weight [3840,11520,1,1] and tensors for original safetensors file seems not to have context_refiner.0.attention.qkv at all, naming for some tensors is different. I do not know what to check further.

What could be the issue here? Do you need additional info? TIA

Additional Information:
1.120 Linux

Activity

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