fix: halve VAE decode tile size on OOM retry instead of clamping to 256px (#2120)

This commit is contained in:
losewayy authored and GitHub committed 2026-10-10 22:33:37 +08:00
1 parent f89d9b13d7
commit ce95c09ce1
1 file changed
+1 -5
+1 -5
View File
@@ -497,11 +497,7 @@ namespace sd::backend_fit {
return false; return false;
} }
auto smaller_tile = [&](int size) { auto smaller_tile = [&](int size) {
int next_size = size / 2; return std::min(size, std::max(4, size / 2));
if (!tiling_params.enabled) {
next_size = std::min(next_size, 256 / scale_factor);
}
return std::min(size, std::max(4, next_size));
}; };
const int tile_size_w = smaller_tile(latent_tile_size_w); const int tile_size_w = smaller_tile(latent_tile_size_w);
const int tile_size_h = smaller_tile(latent_tile_size_h); const int tile_size_h = smaller_tile(latent_tile_size_h);