mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-24 06:32:12 -03:00
fix: disable pysssss autocomplete in Lora-related nodes
Disable PySSSS autocomplete functionality in: - Lora Loader - Lora Stacker - WanVideo Lora Select node
This commit is contained in:
@@ -17,7 +17,8 @@ class LoraManagerLoader:
|
|||||||
"model": ("MODEL",),
|
"model": ("MODEL",),
|
||||||
# "clip": ("CLIP",),
|
# "clip": ("CLIP",),
|
||||||
"text": (IO.STRING, {
|
"text": (IO.STRING, {
|
||||||
"multiline": True,
|
"multiline": True,
|
||||||
|
"pysssss.autocomplete": False,
|
||||||
"dynamicPrompts": True,
|
"dynamicPrompts": True,
|
||||||
"tooltip": "Format: <lora:lora_name:strength> separated by spaces or punctuation",
|
"tooltip": "Format: <lora:lora_name:strength> separated by spaces or punctuation",
|
||||||
"placeholder": "LoRA syntax input: <lora:name:strength>"
|
"placeholder": "LoRA syntax input: <lora:name:strength>"
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ class LoraStacker:
|
|||||||
"required": {
|
"required": {
|
||||||
"text": (IO.STRING, {
|
"text": (IO.STRING, {
|
||||||
"multiline": True,
|
"multiline": True,
|
||||||
|
"pysssss.autocomplete": False,
|
||||||
"dynamicPrompts": True,
|
"dynamicPrompts": True,
|
||||||
"tooltip": "Format: <lora:lora_name:strength> separated by spaces or punctuation",
|
"tooltip": "Format: <lora:lora_name:strength> separated by spaces or punctuation",
|
||||||
"placeholder": "LoRA syntax input: <lora:name:strength>"
|
"placeholder": "LoRA syntax input: <lora:name:strength>"
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class WanVideoLoraSelect:
|
|||||||
"merge_loras": ("BOOLEAN", {"default": True, "tooltip": "Merge LoRAs into the model, otherwise they are loaded on the fly. Always disabled for GGUF and scaled fp8 models. This affects ALL LoRAs, not just the current one"}),
|
"merge_loras": ("BOOLEAN", {"default": True, "tooltip": "Merge LoRAs into the model, otherwise they are loaded on the fly. Always disabled for GGUF and scaled fp8 models. This affects ALL LoRAs, not just the current one"}),
|
||||||
"text": (IO.STRING, {
|
"text": (IO.STRING, {
|
||||||
"multiline": True,
|
"multiline": True,
|
||||||
|
"pysssss.autocomplete": False,
|
||||||
"dynamicPrompts": True,
|
"dynamicPrompts": True,
|
||||||
"tooltip": "Format: <lora:lora_name:strength> separated by spaces or punctuation",
|
"tooltip": "Format: <lora:lora_name:strength> separated by spaces or punctuation",
|
||||||
"placeholder": "LoRA syntax input: <lora:name:strength>"
|
"placeholder": "LoRA syntax input: <lora:name:strength>"
|
||||||
|
|||||||
@@ -141,11 +141,18 @@ class AutoComplete {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getSearchTerm(value) {
|
getSearchTerm(value) {
|
||||||
const lastCommaIndex = value.lastIndexOf(',');
|
// Use helper to get text before cursor for more accurate positioning
|
||||||
if (lastCommaIndex === -1) {
|
const beforeCursor = this.helper.getBeforeCursor();
|
||||||
return value.trim();
|
if (!beforeCursor) {
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
return value.substring(lastCommaIndex + 1).trim();
|
|
||||||
|
// Split on multiple delimiters: comma, space, '>' and other common separators
|
||||||
|
const segments = beforeCursor.split(/[,\s>]+/);
|
||||||
|
|
||||||
|
// Return the last non-empty segment as search term
|
||||||
|
const lastSegment = segments[segments.length - 1] || '';
|
||||||
|
return lastSegment.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
async search(term = '') {
|
async search(term = '') {
|
||||||
@@ -221,6 +228,13 @@ class AutoComplete {
|
|||||||
if (this.dropdown.lastChild) {
|
if (this.dropdown.lastChild) {
|
||||||
this.dropdown.lastChild.style.borderBottom = 'none';
|
this.dropdown.lastChild.style.borderBottom = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Auto-select the first item with a small delay
|
||||||
|
if (this.items.length > 0) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.selectItem(0);
|
||||||
|
}, 100); // 50ms delay
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
highlightMatch(text, searchTerm) {
|
highlightMatch(text, searchTerm) {
|
||||||
|
|||||||
Reference in New Issue
Block a user