let it work better with extranetwork-lora
|
|
@ -340,6 +340,7 @@ export default {
|
||||||
find = tag.originalValue === name || (output_name && tag.originalValue === output_name)
|
find = tag.originalValue === name || (output_name && tag.originalValue === output_name)
|
||||||
}
|
}
|
||||||
if (find) {
|
if (find) {
|
||||||
|
console.log("1")
|
||||||
indexes.push(index)
|
indexes.push(index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,7 @@ export default {
|
||||||
onTagWeightNumChange(id, e) {
|
onTagWeightNumChange(id, e) {
|
||||||
let tag = this.tags.find(tag => tag.id === id)
|
let tag = this.tags.find(tag => tag.id === id)
|
||||||
if (!tag) return false
|
if (!tag) return false
|
||||||
e = typeof e === "number" || typeof a === "string" ? e : e.target.value
|
e = typeof e === "number" || typeof e === "string" ? e : e.target.value
|
||||||
if (tag.weightNum == e) return
|
if (tag.weightNum == e) return
|
||||||
let weightNum = e
|
let weightNum = e
|
||||||
let value = tag.value
|
let value = tag.value
|
||||||
|
|
@ -403,8 +403,10 @@ export default {
|
||||||
if (localValue !== '') localValue = localValue + ':' + weightNum
|
if (localValue !== '') localValue = localValue + ':' + weightNum
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 如果原来没有括号() [] {} <>,那么就加上括号
|
// 排除Lora、embedding、lyco
|
||||||
if (!common.hasBrackets(value)) {
|
// 如果原来没有括号() [] {},那么就加上括号
|
||||||
|
if (tag.isLora||tag.isLyco||tag.isEmbedding){}
|
||||||
|
else if (!common.hasBrackets(value)) {
|
||||||
if (this.useNovelAiWeightSymbol) {
|
if (this.useNovelAiWeightSymbol) {
|
||||||
value = common.setLayers(value, 1, '{', '}')
|
value = common.setLayers(value, 1, '{', '}')
|
||||||
if (localValue !== '') localValue = common.setLayers(localValue, 1, '{', '}')
|
if (localValue !== '') localValue = common.setLayers(localValue, 1, '{', '}')
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@ import tinycolor from "tinycolor2";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// loraRegex: /^\<lora:\s*([^\:]+)\s*(:)?\s*(\-?[0-9\.]+)?\>$/,
|
// loraRegex: /^\<lora:\s*([^\:]+)\s*(:)?\s*(\-?[0-9\.]+)?\>$/,
|
||||||
loraRegex: /^\<lora:\s*([^\:]+)\s*(:)?\s*(\-?[0-9\.]+)?([^\>]+)?\>$/,
|
// lora加上metadata 描述词
|
||||||
|
loraRegex: /^\<lora:\s*([^\:]+)\s*(:)?\s*(\-?[0-9\.]+)?([^\>]+)?\>/,
|
||||||
// lycoRegex: /^\<lyco:\s*([^\:]+)\s*(:)?\s*(\-?[0-9\.]+)?\>$/,
|
// lycoRegex: /^\<lyco:\s*([^\:]+)\s*(:)?\s*(\-?[0-9\.]+)?\>$/,
|
||||||
lycoRegex: /^\<lyco:\s*([^\:]+)\s*(:)?\s*(\-?[0-9\.]+)?([^\>]+)?\>$/,
|
lycoRegex: /^\<lyco:\s*([^\:]+)\s*(:)?\s*(\-?[0-9\.]+)?([^\>]+)?\>$/,
|
||||||
weightNumRegex: /(.*):(\-?[0-9\.]+)/,
|
weightNumRegex: /(.*):(\-?[0-9\.]+)/,
|
||||||
|
|
|
||||||
|
|
@ -150,8 +150,8 @@ export default (tags, autoBreakBeforeWrap = false, autoBreakAfterWrap = false) =
|
||||||
while (match = regex.exec(value)) {
|
while (match = regex.exec(value)) {
|
||||||
let startIndex = match.index
|
let startIndex = match.index
|
||||||
let endIndex = startIndex + match[0].length
|
let endIndex = startIndex + match[0].length
|
||||||
let before = value.substring(0, startIndex)
|
let before = value.substring(0, startIndex).trim()
|
||||||
let after = value.substring(endIndex)
|
let after = value.substring(endIndex).trim()
|
||||||
let middle = match[0]
|
let middle = match[0]
|
||||||
values.push(before)
|
values.push(before)
|
||||||
values.push(middle)
|
values.push(middle)
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 513 B |
|
Before Width: | Height: | Size: 634 B After Width: | Height: | Size: 634 B |
|
Before Width: | Height: | Size: 789 B After Width: | Height: | Size: 789 B |
|
Before Width: | Height: | Size: 910 B After Width: | Height: | Size: 910 B |