fix encoding VAE tiling for Qwen Image (#1785)

This commit is contained in:
Wagner Bruna 2025-10-09 23:07:50 -03:00 committed by GitHub
parent 5b6ba02167
commit bece22f996
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1553,10 +1553,19 @@ public:
if (vae_tiling_params.enabled && !encode_video) {
// TODO wan2.2 vae support?
int C = sd_version_is_dit(version) ? 16 : 4;
if (!use_tiny_autoencoder) {
C *= 2;
int NE2, NE3;
if (sd_version_is_qwen_image(version)) {
NE2 = x->ne[3];
NE3 = C;
}
result = ggml_new_tensor_4d(work_ctx, GGML_TYPE_F32, W, H, C, x->ne[3]);
else {
if (!use_tiny_autoencoder) {
C *= 2;
}
NE2 = C;
NE3 = x->ne[3];
}
result = ggml_new_tensor_4d(work_ctx, GGML_TYPE_F32, W, H, NE2, NE3);
}
if (sd_version_is_qwen_image(version)) {