feat(settings): improve library bootstrap logic and path handling

- Normalize folder paths before library bootstrap to ensure consistent structure
- Add _has_configured_paths helper to detect valid folder configurations
- Enhance bootstrap logic to handle edge cases with single libraries and empty paths
- Update library payload construction to use normalized paths
- Add example settings file changes to demonstrate new path structure

The changes ensure more robust library initialization when folder paths are configured at the top level but not properly propagated to individual libraries.
This commit is contained in:
Will Miao
2025-10-26 23:40:07 +08:00
parent 2d4bc47746
commit e0332571da
3 changed files with 111 additions and 8 deletions

View File

@@ -1,16 +1,17 @@
{
"_note": "LoRA Manager builds the detailed library registry automatically at runtime.",
"language": "en",
"civitai_api_key": "your_civitai_api_key_here",
"folder_paths": {
"loras": [
"C:/path/to/your/loras_folder"
"C:/path/to/your/loras_folder",
"C:/path/to/another/loras_folder"
],
"checkpoints": [
"C:/path/to/your/checkpoints_folder"
"C:/path/to/your/checkpoints_folder",
"C:/path/to/another/checkpoints_folder"
],
"embeddings": [
"C:/path/to/your/embeddings_folder"
"C:/path/to/your/embeddings_folder",
"C:/path/to/another/embeddings_folder"
]
}
}