fix(metadata): rename model_type to sub_type and add embedding subtype, see #797

- Change `model_type` field to `sub_type` for checkpoint models to improve naming consistency
- Add `sub_type="embedding"` for embedding models to properly categorize model subtypes
- Maintain backward compatibility with existing metadata structure
This commit is contained in:
Will Miao
2026-01-31 22:54:53 +08:00
parent 719e18adb6
commit ffcfe5ea3e

View File

@@ -223,7 +223,7 @@ class MetadataManager:
preview_url=normalize_path(preview_url),
tags=[],
modelDescription="",
model_type="checkpoint",
sub_type="checkpoint",
from_civitai=True
)
elif model_class.__name__ == "EmbeddingMetadata":
@@ -238,6 +238,7 @@ class MetadataManager:
preview_url=normalize_path(preview_url),
tags=[],
modelDescription="",
sub_type="embedding",
from_civitai=True
)
else: # Default to LoraMetadata