mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-28 21:51:15 -03:00
fix(import): discover LoRA + checkpoint from modelVersionIds when API meta is null
When CivitAI image API returns meta=null and modelVersionIds at root level, the import flow now: - Injects modelVersionIds + browsingLevel into a minimal metadata dict so the parser can discover LoRAs and checkpoints (both import-from-url and analyze-image paths) - Adds checkpoint dedup + fallback in the parser's modelVersionIds handler to avoid duplicate API calls - Runs EXIF extraction unconditionally in analyze-image path, then merges with API metadata (fixes gen params loss) - Propagates preview_nsfw_level through all three import paths: import-from-url, analyze-image (UI Import), and batch-import, plus the frontend save flow
This commit is contained in:
@@ -57,9 +57,16 @@ export class DownloadManager {
|
||||
base_model: this.importManager.recipeData.base_model || "",
|
||||
loras: this.importManager.recipeData.loras || [],
|
||||
gen_params: this.importManager.recipeData.gen_params || {},
|
||||
raw_metadata: this.importManager.recipeData.raw_metadata || {}
|
||||
raw_metadata: this.importManager.recipeData.raw_metadata || {},
|
||||
};
|
||||
|
||||
// Preserve preview_nsfw_level from analysis so the saved
|
||||
// recipe applies the correct NSFW blur on the preview image.
|
||||
const nsfwLevel = this.importManager.recipeData.preview_nsfw_level;
|
||||
if (nsfwLevel !== undefined && nsfwLevel !== null) {
|
||||
completeMetadata.preview_nsfw_level = nsfwLevel;
|
||||
}
|
||||
|
||||
const checkpointMetadata =
|
||||
this.importManager.recipeData.checkpoint ||
|
||||
this.importManager.recipeData.model ||
|
||||
|
||||
Reference in New Issue
Block a user