feat: include Negative file type in primary file selection for embeddings

This commit is contained in:
Will Miao
2025-11-18 14:16:22 +08:00
parent 831a9da9d7
commit 059ebeead7

View File

@@ -331,7 +331,7 @@ class DownloadManager:
await progress_callback(0)
# 2. Get file information
file_info = next((f for f in version_info.get('files', []) if f.get('primary') and f.get('type') == 'Model'), None)
file_info = next((f for f in version_info.get('files', []) if f.get('primary') and f.get('type') in ('Model', 'Negative')), None)
if not file_info:
return {'success': False, 'error': 'No primary file found in metadata'}
mirrors = file_info.get('mirrors') or []