fix: include locally available LoRAs in recipe syntax even if deleted from Civitai (#948)

get_recipe_syntax_tokens() previously skipped all LoRAs with
isDeleted=True unconditionally. Now it tries to resolve the file
locally first (via hash index or modelVersionId); only skips if
the LoRA is truly unavailable.

This is a companion fix to #946 (AutoV2 hash matching).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
hein
2026-08-18 15:10:53 +08:00
committed by GitHub
parent 846206d958
commit 4a6042d0b4
+2 -3
View File
@@ -3590,9 +3590,6 @@ class RecipeScanner:
syntax_parts: List[str] = [] syntax_parts: List[str] = []
for lora in loras: for lora in loras:
if lora.get("isDeleted", False):
continue
file_name = None file_name = None
folder = "" folder = ""
hash_value = (lora.get("hash") or "").lower() hash_value = (lora.get("hash") or "").lower()
@@ -3627,6 +3624,8 @@ class RecipeScanner:
break break
if not file_name: if not file_name:
if lora.get("isDeleted", False):
continue
file_name = lora.get("file_name", "unknown-lora") file_name = lora.get("file_name", "unknown-lora")
folder = lora.get("folder", "") folder = lora.get("folder", "")