mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-05-07 00:46:44 -03:00
fix(trigger-words): raise group word limit
This commit is contained in:
@@ -1761,8 +1761,8 @@
|
|||||||
},
|
},
|
||||||
"triggerWords": {
|
"triggerWords": {
|
||||||
"loadFailed": "Konnte trainierte Wörter nicht laden",
|
"loadFailed": "Konnte trainierte Wörter nicht laden",
|
||||||
"tooLong": "Trigger Word sollte 100 Wörter nicht überschreiten",
|
"tooLong": "Trigger Word sollte 500 Wörter nicht überschreiten",
|
||||||
"tooMany": "Maximal 30 Trigger Words erlaubt",
|
"tooMany": "Maximal 100 Trigger Words erlaubt",
|
||||||
"alreadyExists": "Dieses Trigger Word existiert bereits",
|
"alreadyExists": "Dieses Trigger Word existiert bereits",
|
||||||
"updateSuccess": "Trigger Words erfolgreich aktualisiert",
|
"updateSuccess": "Trigger Words erfolgreich aktualisiert",
|
||||||
"updateFailed": "Fehler beim Aktualisieren der Trigger Words",
|
"updateFailed": "Fehler beim Aktualisieren der Trigger Words",
|
||||||
|
|||||||
@@ -1761,8 +1761,8 @@
|
|||||||
},
|
},
|
||||||
"triggerWords": {
|
"triggerWords": {
|
||||||
"loadFailed": "Could not load trained words",
|
"loadFailed": "Could not load trained words",
|
||||||
"tooLong": "Trigger word should not exceed 100 words",
|
"tooLong": "Trigger word should not exceed 500 words",
|
||||||
"tooMany": "Maximum 30 trigger words allowed",
|
"tooMany": "Maximum 100 trigger words allowed",
|
||||||
"alreadyExists": "This trigger word already exists",
|
"alreadyExists": "This trigger word already exists",
|
||||||
"updateSuccess": "Trigger words updated successfully",
|
"updateSuccess": "Trigger words updated successfully",
|
||||||
"updateFailed": "Failed to update trigger words",
|
"updateFailed": "Failed to update trigger words",
|
||||||
|
|||||||
@@ -1761,8 +1761,8 @@
|
|||||||
},
|
},
|
||||||
"triggerWords": {
|
"triggerWords": {
|
||||||
"loadFailed": "No se pudieron cargar palabras entrenadas",
|
"loadFailed": "No se pudieron cargar palabras entrenadas",
|
||||||
"tooLong": "La palabra clave no debe exceder 100 palabras",
|
"tooLong": "La palabra clave no debe exceder 500 palabras",
|
||||||
"tooMany": "Máximo 30 palabras clave permitidas",
|
"tooMany": "Máximo 100 palabras clave permitidas",
|
||||||
"alreadyExists": "Esta palabra clave ya existe",
|
"alreadyExists": "Esta palabra clave ya existe",
|
||||||
"updateSuccess": "Palabras clave actualizadas exitosamente",
|
"updateSuccess": "Palabras clave actualizadas exitosamente",
|
||||||
"updateFailed": "Error al actualizar palabras clave",
|
"updateFailed": "Error al actualizar palabras clave",
|
||||||
|
|||||||
@@ -1761,8 +1761,8 @@
|
|||||||
},
|
},
|
||||||
"triggerWords": {
|
"triggerWords": {
|
||||||
"loadFailed": "Impossible de charger les mots entraînés",
|
"loadFailed": "Impossible de charger les mots entraînés",
|
||||||
"tooLong": "Le mot-clé ne doit pas dépasser 100 mots",
|
"tooLong": "Le mot-clé ne doit pas dépasser 500 mots",
|
||||||
"tooMany": "Maximum 30 mots-clés autorisés",
|
"tooMany": "Maximum 100 mots-clés autorisés",
|
||||||
"alreadyExists": "Ce mot-clé existe déjà",
|
"alreadyExists": "Ce mot-clé existe déjà",
|
||||||
"updateSuccess": "Mots-clés mis à jour avec succès",
|
"updateSuccess": "Mots-clés mis à jour avec succès",
|
||||||
"updateFailed": "Échec de la mise à jour des mots-clés",
|
"updateFailed": "Échec de la mise à jour des mots-clés",
|
||||||
|
|||||||
@@ -1761,8 +1761,8 @@
|
|||||||
},
|
},
|
||||||
"triggerWords": {
|
"triggerWords": {
|
||||||
"loadFailed": "לא ניתן היה לטעון מילים מאומנות",
|
"loadFailed": "לא ניתן היה לטעון מילים מאומנות",
|
||||||
"tooLong": "מילת טריגר לא תעלה על 100 מילים",
|
"tooLong": "מילת טריגר לא תעלה על 500 מילים",
|
||||||
"tooMany": "מותרות עד 30 מילות טריגר",
|
"tooMany": "מותרות עד 100 מילות טריגר",
|
||||||
"alreadyExists": "מילת טריגר זו כבר קיימת",
|
"alreadyExists": "מילת טריגר זו כבר קיימת",
|
||||||
"updateSuccess": "מילות הטריגר עודכנו בהצלחה",
|
"updateSuccess": "מילות הטריגר עודכנו בהצלחה",
|
||||||
"updateFailed": "עדכון מילות הטריגר נכשל",
|
"updateFailed": "עדכון מילות הטריגר נכשל",
|
||||||
|
|||||||
@@ -1761,8 +1761,8 @@
|
|||||||
},
|
},
|
||||||
"triggerWords": {
|
"triggerWords": {
|
||||||
"loadFailed": "学習済みワードを読み込めませんでした",
|
"loadFailed": "学習済みワードを読み込めませんでした",
|
||||||
"tooLong": "トリガーワードは100ワードを超えてはいけません",
|
"tooLong": "トリガーワードは500ワードを超えてはいけません",
|
||||||
"tooMany": "最大30トリガーワードまで許可されています",
|
"tooMany": "最大100トリガーワードまで許可されています",
|
||||||
"alreadyExists": "このトリガーワードは既に存在します",
|
"alreadyExists": "このトリガーワードは既に存在します",
|
||||||
"updateSuccess": "トリガーワードが正常に更新されました",
|
"updateSuccess": "トリガーワードが正常に更新されました",
|
||||||
"updateFailed": "トリガーワードの更新に失敗しました",
|
"updateFailed": "トリガーワードの更新に失敗しました",
|
||||||
|
|||||||
@@ -1761,8 +1761,8 @@
|
|||||||
},
|
},
|
||||||
"triggerWords": {
|
"triggerWords": {
|
||||||
"loadFailed": "학습된 단어를 로딩할 수 없습니다",
|
"loadFailed": "학습된 단어를 로딩할 수 없습니다",
|
||||||
"tooLong": "트리거 단어는 100단어를 초과할 수 없습니다",
|
"tooLong": "트리거 단어는 500단어를 초과할 수 없습니다",
|
||||||
"tooMany": "최대 30개의 트리거 단어만 허용됩니다",
|
"tooMany": "최대 100개의 트리거 단어만 허용됩니다",
|
||||||
"alreadyExists": "이 트리거 단어는 이미 존재합니다",
|
"alreadyExists": "이 트리거 단어는 이미 존재합니다",
|
||||||
"updateSuccess": "트리거 단어가 성공적으로 업데이트되었습니다",
|
"updateSuccess": "트리거 단어가 성공적으로 업데이트되었습니다",
|
||||||
"updateFailed": "트리거 단어 업데이트에 실패했습니다",
|
"updateFailed": "트리거 단어 업데이트에 실패했습니다",
|
||||||
|
|||||||
@@ -1761,8 +1761,8 @@
|
|||||||
},
|
},
|
||||||
"triggerWords": {
|
"triggerWords": {
|
||||||
"loadFailed": "Не удалось загрузить обученные слова",
|
"loadFailed": "Не удалось загрузить обученные слова",
|
||||||
"tooLong": "Триггерное слово не должно превышать 100 слов",
|
"tooLong": "Триггерное слово не должно превышать 500 слов",
|
||||||
"tooMany": "Максимум 30 триггерных слов разрешено",
|
"tooMany": "Максимум 100 триггерных слов разрешено",
|
||||||
"alreadyExists": "Это триггерное слово уже существует",
|
"alreadyExists": "Это триггерное слово уже существует",
|
||||||
"updateSuccess": "Триггерные слова успешно обновлены",
|
"updateSuccess": "Триггерные слова успешно обновлены",
|
||||||
"updateFailed": "Не удалось обновить триггерные слова",
|
"updateFailed": "Не удалось обновить триггерные слова",
|
||||||
|
|||||||
@@ -1761,8 +1761,8 @@
|
|||||||
},
|
},
|
||||||
"triggerWords": {
|
"triggerWords": {
|
||||||
"loadFailed": "无法加载训练词",
|
"loadFailed": "无法加载训练词",
|
||||||
"tooLong": "触发词不能超过100个词",
|
"tooLong": "触发词不能超过500个词",
|
||||||
"tooMany": "最多允许30个触发词",
|
"tooMany": "最多允许100个触发词",
|
||||||
"alreadyExists": "该触发词已存在",
|
"alreadyExists": "该触发词已存在",
|
||||||
"updateSuccess": "触发词更新成功",
|
"updateSuccess": "触发词更新成功",
|
||||||
"updateFailed": "触发词更新失败",
|
"updateFailed": "触发词更新失败",
|
||||||
|
|||||||
@@ -1761,8 +1761,8 @@
|
|||||||
},
|
},
|
||||||
"triggerWords": {
|
"triggerWords": {
|
||||||
"loadFailed": "無法載入訓練詞",
|
"loadFailed": "無法載入訓練詞",
|
||||||
"tooLong": "觸發詞不可超過 100 個字",
|
"tooLong": "觸發詞不可超過 500 個字",
|
||||||
"tooMany": "最多允許 30 個觸發詞",
|
"tooMany": "最多允許 100 個觸發詞",
|
||||||
"alreadyExists": "此觸發詞已存在",
|
"alreadyExists": "此觸發詞已存在",
|
||||||
"updateSuccess": "觸發詞已更新",
|
"updateSuccess": "觸發詞已更新",
|
||||||
"updateFailed": "更新觸發詞失敗",
|
"updateFailed": "更新觸發詞失敗",
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import { translate } from '../../utils/i18nHelpers.js';
|
|||||||
import { getModelApiClient } from '../../api/modelApiFactory.js';
|
import { getModelApiClient } from '../../api/modelApiFactory.js';
|
||||||
import { escapeAttribute, escapeHtml } from './utils.js';
|
import { escapeAttribute, escapeHtml } from './utils.js';
|
||||||
|
|
||||||
|
const MAX_WORDS_PER_TRIGGER_GROUP = 500;
|
||||||
|
const MAX_TRIGGER_WORD_GROUPS = 100;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetch trained words for a model
|
* Fetch trained words for a model
|
||||||
* @param {string} filePath - Path to the model file
|
* @param {string} filePath - Path to the model file
|
||||||
@@ -523,14 +526,14 @@ function addNewTriggerWord(word) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validation: Check length
|
// Validation: Check length
|
||||||
if (word.split(/\s+/).length > 100) {
|
if (word.split(/\s+/).length > MAX_WORDS_PER_TRIGGER_GROUP) {
|
||||||
showToast('toast.triggerWords.tooLong', {}, 'error');
|
showToast('toast.triggerWords.tooLong', {}, 'error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validation: Check total number
|
// Validation: Check total number
|
||||||
const currentTags = tagsContainer.querySelectorAll('.trigger-word-tag');
|
const currentTags = tagsContainer.querySelectorAll('.trigger-word-tag');
|
||||||
if (currentTags.length >= 100) {
|
if (currentTags.length >= MAX_TRIGGER_WORD_GROUPS) {
|
||||||
showToast('toast.triggerWords.tooMany', {}, 'error');
|
showToast('toast.triggerWords.tooMany', {}, 'error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user