Update node_cache.py

comment to english
This commit is contained in:
efwfe 2024-05-24 15:34:34 +08:00 committed by GitHub
parent a81b0087d4
commit bb4d37551d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,7 @@ class Cache:
print(f"[==Cache==] Removed {k} from cache.")
def add_cache(self, k, item):
"""模型patch会修改key的名字,缓存之前保留一份key的数据和值的引用"""
"""model patch change the key name of tensor, cache the names here"""
keys = list(item.keys())
values = list(item.values())
self._cache[k] = (keys, values)