Document why the cache fan-out invalidates only the replica registry
This commit is contained in:
parent
87054e7f94
commit
ce32c1e1fd
1 changed files with 5 additions and 0 deletions
|
|
@ -227,6 +227,11 @@ class CFGParallelProxy:
|
|||
|
||||
# ── cache fan-out (keeps per-branch cache state identical to single-GPU) ──
|
||||
def enable_cache(self, config: Any) -> None:
|
||||
# The primary needs no explicit registry invalidation here: the caller
|
||||
# (apply_step_cache) runs _invalidate_child_registry_cache on the object it
|
||||
# enabled, and this proxy's __getattr__ forwards _diffusers_hook to _primary,
|
||||
# so that call nulls the PRIMARY's cached child list. Only the replica is
|
||||
# unreachable through delegation, hence its explicit _invalidate_registry.
|
||||
self._primary.enable_cache(config)
|
||||
try:
|
||||
self._replica.enable_cache(config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue