Fix the problem of repeatedly trying to fetch model description metadata when the model has a null description.

This commit is contained in:
Will Miao
2025-03-12 15:25:58 +08:00
parent 03ddd51a91
commit e9a703451c
2 changed files with 3 additions and 3 deletions

View File

@@ -190,7 +190,7 @@ class CivitaiClient:
# Extract relevant metadata
metadata = {
"description": data.get("description", ""),
"description": data.get("description") or "No model description available",
"tags": data.get("tags", [])
}

View File

@@ -410,7 +410,7 @@ class LoraScanner:
# Fetch missing metadata if needed
if needs_metadata_update and model_id:
logger.info(f"Fetching missing metadata for {file_path} with model ID {model_id}")
logger.debug(f"Fetching missing metadata for {file_path} with model ID {model_id}")
from ..services.civitai_client import CivitaiClient
client = CivitaiClient()
@@ -431,7 +431,7 @@ class LoraScanner:
# Process valid metadata if available
elif model_metadata:
logger.info(f"Updating metadata for {file_path} with model ID {model_id}")
logger.debug(f"Updating metadata for {file_path} with model ID {model_id}")
# Update tags if they were missing
if model_metadata.get('tags') and (not lora_data.get('tags') or len(lora_data.get('tags', [])) == 0):