mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
feat: consolidate checkpoint metadata handling
- Extract checkpoint entry from multiple metadata locations using helper method - Sanitize checkpoint metadata by removing transient/local-only fields - Remove checkpoint duplication from generation parameters to store only at top level - Update frontend to properly populate checkpoint metadata during import - Add tests for new checkpoint handling functionality This ensures consistent checkpoint metadata structure and prevents data duplication across different storage locations.
This commit is contained in:
@@ -56,6 +56,15 @@ export class DownloadManager {
|
||||
gen_params: this.importManager.recipeData.gen_params || {},
|
||||
raw_metadata: this.importManager.recipeData.raw_metadata || {}
|
||||
};
|
||||
|
||||
const checkpointMetadata =
|
||||
this.importManager.recipeData.checkpoint ||
|
||||
this.importManager.recipeData.model ||
|
||||
(this.importManager.recipeData.gen_params || {}).checkpoint;
|
||||
|
||||
if (checkpointMetadata && typeof checkpointMetadata === 'object') {
|
||||
completeMetadata.checkpoint = checkpointMetadata;
|
||||
}
|
||||
|
||||
// Add source_path to metadata to track where the recipe was imported from
|
||||
if (this.importManager.importMode === 'url') {
|
||||
|
||||
Reference in New Issue
Block a user