mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-12 04:48:12 +02:00
Remove the +/- 2 limit on lora strengths
This commit is contained in:
parent
7c358c2842
commit
0d610c5393
@ -2242,7 +2242,7 @@ promptField.focus()
|
|||||||
promptField.selectionStart = promptField.value.length
|
promptField.selectionStart = promptField.value.length
|
||||||
|
|
||||||
// multi-models
|
// multi-models
|
||||||
function addModelEntry(i, modelContainer, modelsList, modelType, defaultValue, minStrength, maxStrength, strengthStep) {
|
function addModelEntry(i, modelContainer, modelsList, modelType, defaultValue, strengthStep) {
|
||||||
let nameId = modelType + "_model_" + i
|
let nameId = modelType + "_model_" + i
|
||||||
let strengthId = modelType + "_alpha_" + i
|
let strengthId = modelType + "_alpha_" + i
|
||||||
|
|
||||||
@ -2250,7 +2250,7 @@ function addModelEntry(i, modelContainer, modelsList, modelType, defaultValue, m
|
|||||||
modelEntry.className = "model_entry"
|
modelEntry.className = "model_entry"
|
||||||
modelEntry.innerHTML = `
|
modelEntry.innerHTML = `
|
||||||
<input id="${nameId}" class="model_name" type="text" spellcheck="false" autocomplete="off" class="model-filter" data-path="" />
|
<input id="${nameId}" class="model_name" type="text" spellcheck="false" autocomplete="off" class="model-filter" data-path="" />
|
||||||
<input id="${strengthId}" class="model_strength" type="number" max="${maxStrength}" min="${minStrength}" step="${strengthStep}" style="width: 50pt" value="${defaultValue}" pattern="^-?[0-9]*\.?[0-9]*$" onkeypress="preventNonNumericalInput(event)"><br/>
|
<input id="${strengthId}" class="model_strength" type="number" step="${strengthStep}" style="width: 50pt" value="${defaultValue}" pattern="^-?[0-9]*\.?[0-9]*$" onkeypress="preventNonNumericalInput(event)"><br/>
|
||||||
`
|
`
|
||||||
|
|
||||||
let modelName = new ModelDropdown(modelEntry.querySelector(".model_name"), modelType, "None")
|
let modelName = new ModelDropdown(modelEntry.querySelector(".model_name"), modelType, "None")
|
||||||
@ -2263,7 +2263,7 @@ function addModelEntry(i, modelContainer, modelsList, modelType, defaultValue, m
|
|||||||
function createLoRAEntries() {
|
function createLoRAEntries() {
|
||||||
let container = document.querySelector("#lora_model_container .model_entries")
|
let container = document.querySelector("#lora_model_container .model_entries")
|
||||||
for (let i = 0; i < 3; i++) {
|
for (let i = 0; i < 3; i++) {
|
||||||
addModelEntry(i, container, loraModels, "lora", 0.5, -2, 2, 0.02)
|
addModelEntry(i, container, loraModels, "lora", 0.5, 0.02)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
createLoRAEntries()
|
createLoRAEntries()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user