mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
Fix the problem of repeatedly trying to fetch model description metadata when the model has a null description.
This commit is contained in:
@@ -190,7 +190,7 @@ class CivitaiClient:
|
|||||||
|
|
||||||
# Extract relevant metadata
|
# Extract relevant metadata
|
||||||
metadata = {
|
metadata = {
|
||||||
"description": data.get("description", ""),
|
"description": data.get("description") or "No model description available",
|
||||||
"tags": data.get("tags", [])
|
"tags": data.get("tags", [])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ class LoraScanner:
|
|||||||
|
|
||||||
# Fetch missing metadata if needed
|
# Fetch missing metadata if needed
|
||||||
if needs_metadata_update and model_id:
|
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
|
from ..services.civitai_client import CivitaiClient
|
||||||
client = CivitaiClient()
|
client = CivitaiClient()
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ class LoraScanner:
|
|||||||
|
|
||||||
# Process valid metadata if available
|
# Process valid metadata if available
|
||||||
elif model_metadata:
|
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
|
# Update tags if they were missing
|
||||||
if model_metadata.get('tags') and (not lora_data.get('tags') or len(lora_data.get('tags', [])) == 0):
|
if model_metadata.get('tags') and (not lora_data.get('tags') or len(lora_data.get('tags', [])) == 0):
|
||||||
|
|||||||
Reference in New Issue
Block a user