refactor(lora-cycler): remove sort by control, always use filename

Removed the sort by selection UI from the Lora Cycler widget and
hardcoded the sorting to always use filename. This simplifies the
interface while maintaining all sorting functionality.

Changes:
- Removed sort_by prop/emit from LoraCyclerSettingsView
- Removed sort tabs UI and associated styles
- Hardcoded sort_by = "filename" in backend node
- Removed sort by handling logic from LoraCyclerWidget
- Updated widget height to accommodate removal
This commit is contained in:
Will Miao
2026-01-22 19:58:51 +08:00
parent d1c65a6186
commit b0f852cc6c
6 changed files with 59 additions and 267 deletions

View File

@@ -54,7 +54,7 @@ class LoraCyclerNode:
current_index = cycler_config.get("current_index", 1) # 1-based
model_strength = float(cycler_config.get("model_strength", 1.0))
clip_strength = float(cycler_config.get("clip_strength", 1.0))
sort_by = cycler_config.get("sort_by", "filename")
sort_by = "filename"
# Get scanner and service
scanner = await ServiceRegistry.get_lora_scanner()
@@ -106,12 +106,7 @@ class LoraCyclerNode:
# Get next LoRA for UI display (what will be used next generation)
next_lora = lora_list[next_index - 1]
# Determine display name based on sort_by setting
if sort_by == "filename":
next_display_name = next_lora["file_name"]
else:
next_display_name = next_lora.get("model_name", next_lora["file_name"])
next_display_name = next_lora["file_name"]
return {
"result": (lora_stack,),
@@ -125,6 +120,5 @@ class LoraCyclerNode:
"current_lora_filename": [current_lora["file_name"]],
"next_lora_name": [next_display_name],
"next_lora_filename": [next_lora["file_name"]],
"sort_by": [sort_by],
},
}