fix(z-image): Fix padding token shape mismatch for GGUF models by Pfannkuchensack · Pull Request #8690 · invoke-ai/InvokeAI

@Pfannkuchensack

GGUF Z-Image models store x_pad_token and cap_pad_token with shape [dim],
but diffusers ZImageTransformer2DModel expects [1, dim]. This caused a
RuntimeError when loading GGUF-quantized Z-Image models.

The fix dequantizes GGMLTensors first (since they don't support unsqueeze),
then reshapes to add the batch dimension.

@Pfannkuchensack

blessedcoolant

@blessedcoolant