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