From b03420faac09bfc1473563cf4581922c5cd4af6d Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Mon, 11 Aug 2025 11:14:45 +0800 Subject: [PATCH] fix: skip LoRAs without proper identification in Civitai metadata parser --- py/recipes/parsers/civitai_image.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/py/recipes/parsers/civitai_image.py b/py/recipes/parsers/civitai_image.py index acdc3322..a4fd2c6f 100644 --- a/py/recipes/parsers/civitai_image.py +++ b/py/recipes/parsers/civitai_image.py @@ -101,6 +101,11 @@ class CivitaiApiMetadataParser(RecipeMetadataParser): if resource.get("type", "lora") == "lora": lora_hash = resource.get("hash", "") + # Skip LoRAs without proper identification (hash or modelVersionId) + if not lora_hash and not resource.get("modelVersionId"): + logger.debug(f"Skipping LoRA resource '{resource.get('name', 'Unknown')}' - no hash or modelVersionId") + continue + # Skip if we've already added this LoRA by hash if lora_hash and lora_hash in added_loras: continue