mirror of
https://github.com/Comfy-Org/ComfyUI.git
synced 2026-09-21 13:38:08 -05:00
Add how to cache model stuff to AGENTS.md (#16003)
This commit is contained in:
@@ -297,6 +297,12 @@
|
|||||||
- Avoid caches that persist across different executions as much as possible.
|
- Avoid caches that persist across different executions as much as possible.
|
||||||
Persistent caches are acceptable only when they use a very minimal amount of
|
Persistent caches are acceptable only when they use a very minimal amount of
|
||||||
memory and have a clear ownership and invalidation story.
|
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
|
- When optimizing, favor small measurable changes: fewer allocations, fewer
|
||||||
device transfers, less peak memory, better batching, or use of a faster
|
device transfers, less peak memory, better batching, or use of a faster
|
||||||
existing backend op.
|
existing backend op.
|
||||||
|
|||||||
Reference in New Issue
Block a user