mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-21 21:22:11 -03:00
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:
@@ -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],
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user