Skip to content

Commit 1d98637

Browse files
committed
move fix to get_first_stage_encoding
1 parent 0ba205c commit 1d98637

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

stable-diffusion.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,7 @@ class StableDiffusionGGML {
14511451
}
14521452
} else if (version == VERSION_CHROMA_RADIANCE) {
14531453
// pass
1454-
} else if (!use_tiny_autoencoder) {
1454+
} else {
14551455
ggml_ext_tensor_iter(latent, [&](ggml_tensor* latent, int64_t i0, int64_t i1, int64_t i2, int64_t i3) {
14561456
float value = ggml_ext_tensor_get_f32(latent, i0, i1, i2, i3);
14571457
value = (value - shift_factor) * scale_factor;
@@ -1646,7 +1646,9 @@ class StableDiffusionGGML {
16461646
} else {
16471647
latent = gaussian_latent_sample(work_ctx, vae_output);
16481648
}
1649-
process_latent_in(latent);
1649+
if (!use_tiny_autoencoder) {
1650+
process_latent_in(latent);
1651+
}
16501652
if (sd_version_is_qwen_image(version)) {
16511653
latent = ggml_reshape_4d(work_ctx, latent, latent->ne[0], latent->ne[1], latent->ne[3], 1);
16521654
}

0 commit comments

Comments
 (0)