mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 11:26:34 +00:00
fix: halve VAE decode tile size on OOM retry instead of clamping to 256px (#2120)
This commit is contained in:
1 parent
f89d9b13d7
commit
ce95c09ce1
1 file changed
+1
-5
@@ -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);
|
||||||
|
|||||||
Reference in new issue
Block a user