Commit ce95c09 for stable-diffusion.cpp
commit ce95c09ce14ffbde1fcffa00a05688c63048a023
Author: losewayy <1134285612@qq.com>
Date: Sat Oct 10 22:33:37 2026 +0800
fix: halve VAE decode tile size on OOM retry instead of clamping to 256px (#2120)
diff --git a/src/core/backend_fit.cpp b/src/core/backend_fit.cpp
index 6a7ab43..84667ef 100644
--- a/src/core/backend_fit.cpp
+++ b/src/core/backend_fit.cpp
@@ -497,11 +497,7 @@ namespace sd::backend_fit {
return false;
}
auto smaller_tile = [&](int size) {
- int next_size = size / 2;
- if (!tiling_params.enabled) {
- next_size = std::min(next_size, 256 / scale_factor);
- }
- return std::min(size, std::max(4, next_size));
+ return std::min(size, std::max(4, size / 2));
};
const int tile_size_w = smaller_tile(latent_tile_size_w);
const int tile_size_h = smaller_tile(latent_tile_size_h);