mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-21 03:01:27 -03:00
fix(nodes): snapshot scanner cache before iterating on executor thread
Node code reads cache.raw_data while MetadataSyncService may mutate it from a background thread; iterate over a list() snapshot to avoid a possible 'list changed size during iteration' RuntimeError.
This commit is contained in:
@@ -601,7 +601,7 @@ class SaveImageLM:
|
||||
os.path.basename(name),
|
||||
os.path.splitext(os.path.basename(name))[0],
|
||||
]
|
||||
for model in getattr(cache, "raw_data", []):
|
||||
for model in list(getattr(cache, "raw_data", [])):
|
||||
file_name = model.get("file_name")
|
||||
if file_name in candidates:
|
||||
return model
|
||||
|
||||
Reference in New Issue
Block a user