diff --git a/docs/backend.md b/docs/backend.md index edf7784da..5d7f89d27 100644 --- a/docs/backend.md +++ b/docs/backend.md @@ -188,8 +188,9 @@ weights, compute buffers and caches must still fit the runner's capacity checks. Offloading weights does not guarantee that every resolution or frame count will fit, and auto-fit does not change a component to CPU computation solely because its full weights exceed VRAM. -If a VAE decode fails, auto-fit retries with spatial tiling; supported video -decoders try temporal tiling first and can then add spatial tiling. +If a VAE decode fails, decoding retries with spatial tiling even when `--auto-fit` +is off; supported video decoders try temporal tiling first and can then add +spatial tiling. Spatial retries use half-size tiles along each latent dimension. ## Modules diff --git a/src/core/backend_fit.cpp b/src/core/backend_fit.cpp index 0f2dd67cc..c7cc05804 100644 --- a/src/core/backend_fit.cpp +++ b/src/core/backend_fit.cpp @@ -390,6 +390,8 @@ namespace sd::backend_fit { retry_mode = tiling_params.enabled ? "spatial+temporal" : "temporal"; } else if (!tiling_params.enabled) { tiling_params.enabled = true; + tiling_params.rel_size_x = 0.5f; + tiling_params.rel_size_y = 0.5f; if (tiling_params.tile_size_x <= 0) { tiling_params.tile_size_x = 256; } @@ -401,7 +403,7 @@ namespace sd::backend_fit { return false; } - LOG_WARN("auto-fit: VAE decode failed (likely out of memory); retrying with %s tiling", + LOG_WARN("VAE decode failed (likely out of memory); retrying with %s tiling", retry_mode); return true; } diff --git a/src/pipeline/diffusion_engine.cpp b/src/pipeline/diffusion_engine.cpp index a8797874a..7dba74b8f 100644 --- a/src/pipeline/diffusion_engine.cpp +++ b/src/pipeline/diffusion_engine.cpp @@ -2621,7 +2621,6 @@ sd::Tensor StableDiffusionGGML::decode_first_stage(const sd::Tensordecode(n_threads, latents, vae_tiling_params, decode_video, circular_x, circular_y); const bool prefer_temporal_tiling = decode_video && first_stage_model->can_temporal_tile_decode(); while (decoded.empty() && - auto_fit_enabled && sd::backend_fit::prepare_vae_decode_retry_tiling(vae_tiling_params, prefer_temporal_tiling)) { decoded = first_stage_model->decode(n_threads, latents, vae_tiling_params, decode_video, circular_x, circular_y); }