mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-06-28 13:41:18 -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:
@@ -523,6 +523,10 @@ class BatchImportService:
|
||||
if payload.get("checkpoint"):
|
||||
metadata["checkpoint"] = payload["checkpoint"]
|
||||
|
||||
nsfw = payload.get("preview_nsfw_level")
|
||||
if isinstance(nsfw, int) and nsfw > 0:
|
||||
metadata["preview_nsfw_level"] = nsfw
|
||||
|
||||
image_bytes = None
|
||||
image_base64 = payload.get("image_base64")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user