feat(lora-randomizer): refactor randomization logic and add input preprocessing

- Add `_preprocess_loras_input` method to handle different widget input formats
- Move core randomization logic to `LoraService` for better separation of concerns
- Update `_select_loras` method to use new service-based approach
- Add comprehensive test fixtures for license filtering scenarios
- Include debug print statement for pool config inspection during development

This refactor improves code organization by centralizing business logic in the service layer while maintaining backward compatibility with existing widget inputs.
This commit is contained in:
Will Miao
2026-01-13 15:47:59 +08:00
parent 1ebd2c93a0
commit 514846cd4a
8 changed files with 457 additions and 229 deletions

View File

@@ -734,10 +734,6 @@ export function addLorasWidget(node, name, opts, callback) {
widget.callback = callback;
widget.serializeValue = () => {
return widgetValue;
}
widget.onRemove = () => {
container.remove();
previewTooltip.cleanup();