mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat(parser): enhance model metadata extraction in Automatic1111 parser
- Add MODEL_NAME_PATTERN regex to extract model names from parameters - Extract model hash from parsed hashes when available in metadata - Add checkpoint model hash and name extraction from parameters section - Implement checkpoint resource processing from Civitai metadata - Improve model information completeness for better recipe tracking
This commit is contained in:
@@ -83,6 +83,7 @@ export class ImageProcessor {
|
||||
}
|
||||
|
||||
this.importManager.recipeData = recipeData;
|
||||
this._ensureCheckpointMetadata();
|
||||
|
||||
// Check if we have an error message
|
||||
if (this.importManager.recipeData.error) {
|
||||
@@ -134,6 +135,7 @@ export class ImageProcessor {
|
||||
}
|
||||
|
||||
this.importManager.recipeData = recipeData;
|
||||
this._ensureCheckpointMetadata();
|
||||
|
||||
// Check if we have an error message
|
||||
if (this.importManager.recipeData.error) {
|
||||
@@ -188,6 +190,7 @@ export class ImageProcessor {
|
||||
}
|
||||
|
||||
this.importManager.recipeData = recipeData;
|
||||
this._ensureCheckpointMetadata();
|
||||
|
||||
// Check if we have an error message
|
||||
if (this.importManager.recipeData.error) {
|
||||
@@ -215,4 +218,12 @@ export class ImageProcessor {
|
||||
this.importManager.loadingManager.hide();
|
||||
}
|
||||
}
|
||||
|
||||
_ensureCheckpointMetadata() {
|
||||
if (!this.importManager.recipeData) return;
|
||||
|
||||
if (this.importManager.recipeData.model && !this.importManager.recipeData.checkpoint) {
|
||||
this.importManager.recipeData.checkpoint = this.importManager.recipeData.model;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user