mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
fix: Update author retrieval to handle missing username gracefully in DownloadManager and utils
This commit is contained in:
@@ -352,7 +352,7 @@ class DownloadManager:
|
|||||||
base_model = version_info.get('baseModel', '')
|
base_model = version_info.get('baseModel', '')
|
||||||
|
|
||||||
# Get author from creator data
|
# Get author from creator data
|
||||||
author = version_info.get('creator', {}).get('username', 'Anonymous')
|
author = version_info.get('creator', {}).get('username') or 'Anonymous'
|
||||||
|
|
||||||
# Apply mapping if available
|
# Apply mapping if available
|
||||||
base_model_mappings = settings.get('base_model_path_mappings', {})
|
base_model_mappings = settings.get('base_model_path_mappings', {})
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ def calculate_relative_path_for_model(model_data: Dict, model_type: str = 'lora'
|
|||||||
if civitai_data and civitai_data.get('id') is not None:
|
if civitai_data and civitai_data.get('id') is not None:
|
||||||
base_model = civitai_data.get('baseModel', '')
|
base_model = civitai_data.get('baseModel', '')
|
||||||
# Get author from civitai creator data
|
# Get author from civitai creator data
|
||||||
author = civitai_data.get('creator', {}).get('username', 'Anonymous')
|
author = civitai_data.get('creator', {}).get('username') or 'Anonymous'
|
||||||
else:
|
else:
|
||||||
# Fallback to model_data fields for non-CivitAI models
|
# Fallback to model_data fields for non-CivitAI models
|
||||||
base_model = model_data.get('base_model', '')
|
base_model = model_data.get('base_model', '')
|
||||||
|
|||||||
Reference in New Issue
Block a user