mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-22 13:42:12 -03:00
Refactor load_metadata to use save_metadata for updating metadata files
This commit is contained in:
@@ -245,8 +245,7 @@ async def load_metadata(file_path: str, model_class: Type[BaseModelMetadata] = L
|
||||
# needs_update = True
|
||||
|
||||
if needs_update:
|
||||
with open(metadata_path, 'w', encoding='utf-8') as f:
|
||||
json.dump(data, f, indent=2, ensure_ascii=False)
|
||||
save_metadata(file_path, model_class.from_dict(data))
|
||||
|
||||
return model_class.from_dict(data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user