effective_denoise_steps computed ceil(steps * strength) (steps - int(steps - steps*strength)), but diffusers get_timesteps denoises init_timestep = min(int(num_inference_steps * strength), num_inference_steps), i.e. the floored product. The two differ by one whenever the product is fractional, and that flips the auto FBCache decision in the (19, 20) band: a strength-0.7 28-step img2img denoises int(19.6) = 19 real steps (below FBCACHE_MIN_STEPS = 20) but the old formula returned 20 and engaged FBCache on that short trajectory, exactly the quality hit the auto policy exists to avoid. Return min(int(steps * strength), steps) to match diffusers, and fix the two tests that replayed the old formula. Also honor _default_threads' documented fallback: (os.cpu_count() or 8) // 2 yields 4 when the count is unknown, contradicting the docstring's 'falls back to 8'. Return 8 in that case. |
||
|---|---|---|
| .. | ||
| assets | ||
| auth | ||
| core | ||
| hub | ||
| loggers | ||
| models | ||
| plugins | ||
| requirements | ||
| routes | ||
| state | ||
| storage | ||
| tests | ||
| utils | ||
| __init__.py | ||
| _platform_compat.py | ||
| cloudflare_tunnel.py | ||
| colab.py | ||
| main.py | ||
| run.py | ||
| startup_banner.py | ||