diff --git a/AGENTS.md b/AGENTS.md index b63b7a1d4..51dd6dd65 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -297,6 +297,12 @@ - Avoid caches that persist across different executions as much as possible. Persistent caches are acceptable only when they use a very minimal amount of memory and have a clear ownership and invalidation story. +- When condition-dependent model work would otherwise repeat on every denoising + step and preprocessing it once materially improves performance, expose a + model preprocessing method and call it from `BaseModel.extra_conds`, following + patterns such as LTXAV and Anima. Pass the result through normal conditioning; + do not add model-owned caches, sampler-option caches, or cache-management + wrappers for this work. - When optimizing, favor small measurable changes: fewer allocations, fewer device transfers, less peak memory, better batching, or use of a faster existing backend op.