mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-06 22:10:14 -03:00
Add a pure frontend node that shows filename and editable notes for a selected LoRA. Connect any output from a LoRA Loader/Stacker/Randomizer/ WanVideoSelect to the lora_source input — selecting a LoRA in the source widget updates the info display automatically. - Python node (LoraInfoLM): display-only, no workflow execution - Vue widget: filename label, auto-sizing notes textarea, save button with ComfyUI toast feedback on save - Frontend extension: wire-based selection propagation with stale-response race guard; clears display on wire disconnect - Backend: get-notes endpoint now returns file_path alongside notes; matching supports full-path lora syntax; fix NoneType crash in trigger words endpoint; document cache file_name invariant - Wired into all four lora widget nodes (Loader, Stacker, Randomizer, WanVideoSelect)
46 lines
1.3 KiB
Python
46 lines
1.3 KiB
Python
"""Lora Info display node — pure frontend node for showing selected LoRA info.
|
|
|
|
This node does NOT participate in workflow execution. Its single optional
|
|
"lora_source" input exists solely as a wire-connection anchor so that the
|
|
frontend can traverse the graph and push selection data to connected info nodes.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
class LoraInfoLM:
|
|
"""Display node that shows filename and notes for the selected LoRA."""
|
|
|
|
NAME = "Lora Info (LoraManager)"
|
|
CATEGORY = "Lora Manager/utils"
|
|
DESCRIPTION = (
|
|
"Displays information (filename, notes) about the currently selected "
|
|
"LoRA. Connect any output from a LoRA Loader or Stacker to the "
|
|
"lora_source input, then select a LoRA in the source widget — the "
|
|
"info updates automatically. Does not affect workflow execution."
|
|
)
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {
|
|
"required": {},
|
|
}
|
|
|
|
RETURN_TYPES = ()
|
|
RETURN_NAMES = ()
|
|
OUTPUT_NODE = False
|
|
FUNCTION = "noop"
|
|
|
|
def noop(self, **kwargs):
|
|
# This node is display-only — no workflow execution needed.
|
|
return ()
|
|
|
|
|
|
NODE_CLASS_MAPPINGS = {
|
|
LoraInfoLM.NAME: LoraInfoLM,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
LoraInfoLM.NAME: "Lora Info (LoraManager)",
|
|
}
|