feat(loras): warn when widget strength leaves the usage-tips range

The cycler-list payload now carries usage_tips, and the LORAS widget
parses strength_min/strength_max/strength_range into a cached lookup.
Strength inputs (model and clip) turn amber with an explanatory tooltip
when dragged, typed, or stepped outside the recommended range.

Related: https://github.com/willmiao/ComfyUI-Lora-Manager/issues/1090
This commit is contained in:
Will Miao
2026-09-19 05:49:01 +08:00
parent 3b9e8efb3d
commit c8c84bfc54
7 changed files with 584 additions and 8 deletions
+11 -5
View File
@@ -714,12 +714,18 @@ class LoraService(BaseModelService):
),
)
# Return minimal data needed for cycling
return [
{
# Return minimal data needed for cycling. usage_tips is only included
# when non-empty so widget consumers (recommended strength range cues)
# can build their lookup without inflating the payload.
result = []
for lora in available_loras:
entry = {
"file_name": f"{lora['folder']}/{lora['file_name']}" if lora.get("folder") else lora["file_name"],
"model_name": lora.get("model_name", lora["file_name"]),
"folder": lora.get("folder", ""),
}
for lora in available_loras
]
usage_tips = lora.get("usage_tips")
if usage_tips:
entry["usage_tips"] = usage_tips
result.append(entry)
return result