Tests don't catch `cache_context` calls that omit `timestep`

Abierto
#15,322 1 comentario 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@sayakpaul ya está trabajando en esto.

Desde el 17/11/2026.

  • #15331 de @sayakpaul — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.

Lenguaje dominante
Python
Estrellas
34.9k
Forks
7.5k
Merge medio
3 d 16 h
PR fusionados (30 d)
65

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de huggingface/diffusers

Todos los issues de huggingface/diffusers

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.