You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tests don't catch cache_context calls that omit timestep #15322
PAB and FasterCache now read the current timestep from cache_context(name, timestep=...) (#14900). If a denoising loop leaves timestep out, both hooks raise a ValueError once the cache is enabled.
No test catches a call site that forgets it:
The model-level cache tests call cache_context themselves, so they never run a pipeline's denoising loop.
No modular pipeline test enables PAB or FasterCache, or checks what is passed to cache_context. The one exception is Cosmos 3, which checks step_index, sigma and num_inference_steps.
For the standard pipelines, only 11 test files use the PAB or FasterCache tester mixins (Flux, HunyuanVideo, Mochi, Allegro, Latte, CogVideoX).
This came up in #14900. Four call sites in the PAN 2, Kandinsky S2V and Qwen-Image 2.1 modular blocks were missing timestep. They were found in review, not by a test.
Suggestion: add a shared test to the pipeline and modular pipeline tester mixins that patches transformer.cache_context, runs the pipeline, and asserts every call received a timestep. The Cosmos 3 test test_transformer_cache_contexts_receive_exact_scheduler_info already does this for its own fields and could be generalized.
Activity
sayakpaul commentedon Nov 17, 2026
Cc: @yiyixuxu