mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -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
|
# needs_update = True
|
||||||
|
|
||||||
if needs_update:
|
if needs_update:
|
||||||
with open(metadata_path, 'w', encoding='utf-8') as f:
|
save_metadata(file_path, model_class.from_dict(data))
|
||||||
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