forked from extern/easydiffusion
Some more fixes for multi-lora use-these-settings
This commit is contained in:
parent
1190bedafd
commit
894f34678e
@ -292,10 +292,6 @@ const TASK_MAPPING = {
|
|||||||
use_lora_model: {
|
use_lora_model: {
|
||||||
name: "LoRA model",
|
name: "LoRA model",
|
||||||
setUI: (use_lora_model) => {
|
setUI: (use_lora_model) => {
|
||||||
if (!use_lora_model) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let modelPaths = []
|
let modelPaths = []
|
||||||
use_lora_model.forEach((m) => {
|
use_lora_model.forEach((m) => {
|
||||||
if (m.includes("models\\lora\\")) {
|
if (m.includes("models\\lora\\")) {
|
||||||
@ -333,10 +329,6 @@ const TASK_MAPPING = {
|
|||||||
lora_alpha: {
|
lora_alpha: {
|
||||||
name: "LoRA Strength",
|
name: "LoRA Strength",
|
||||||
setUI: (lora_alpha) => {
|
setUI: (lora_alpha) => {
|
||||||
if (!lora_alpha) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
loraModelField.modelWeights = lora_alpha
|
loraModelField.modelWeights = lora_alpha
|
||||||
},
|
},
|
||||||
readUI: () => {
|
readUI: () => {
|
||||||
|
@ -204,6 +204,10 @@ class MultiModelSelector {
|
|||||||
set modelNames(newModelNames) {
|
set modelNames(newModelNames) {
|
||||||
this.resizeEntryList(newModelNames.length)
|
this.resizeEntryList(newModelNames.length)
|
||||||
|
|
||||||
|
if (newModelNames.length === 0) {
|
||||||
|
this.getModelElements()[0].name.value = ""
|
||||||
|
}
|
||||||
|
|
||||||
// assign to the corresponding elements
|
// assign to the corresponding elements
|
||||||
let currElements = this.getModelElements()
|
let currElements = this.getModelElements()
|
||||||
for (let i = 0; i < newModelNames.length; i++) {
|
for (let i = 0; i < newModelNames.length; i++) {
|
||||||
@ -220,6 +224,10 @@ class MultiModelSelector {
|
|||||||
set modelWeights(newModelWeights) {
|
set modelWeights(newModelWeights) {
|
||||||
this.resizeEntryList(newModelWeights.length)
|
this.resizeEntryList(newModelWeights.length)
|
||||||
|
|
||||||
|
if (newModelWeights.length === 0) {
|
||||||
|
this.getModelElements()[0].weight.value = this.defaultWeight
|
||||||
|
}
|
||||||
|
|
||||||
// assign to the corresponding elements
|
// assign to the corresponding elements
|
||||||
let currElements = this.getModelElements()
|
let currElements = this.getModelElements()
|
||||||
for (let i = 0; i < newModelWeights.length; i++) {
|
for (let i = 0; i < newModelWeights.length; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user