mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-22 05:32:12 -03:00
fix: Improve author retrieval logic in calculate_relative_path_for_model function to handle missing creator data
This commit is contained in:
@@ -156,7 +156,8 @@ def calculate_relative_path_for_model(model_data: Dict, model_type: str = 'lora'
|
||||
if civitai_data and civitai_data.get('id') is not None:
|
||||
base_model = civitai_data.get('baseModel', '')
|
||||
# Get author from civitai creator data
|
||||
author = civitai_data.get('creator', {}).get('username') or 'Anonymous'
|
||||
creator_info = civitai_data.get('creator') or {}
|
||||
author = creator_info.get('username') or 'Anonymous'
|
||||
else:
|
||||
# Fallback to model_data fields for non-CivitAI models
|
||||
base_model = model_data.get('base_model', '')
|
||||
|
||||
Reference in New Issue
Block a user