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