mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-05-07 17:22:04 +00:00
fix encoding VAE tiling for Qwen Image (#1785)
This commit is contained in:
parent
5b6ba02167
commit
bece22f996
1 changed files with 12 additions and 3 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue