setters for controlnet's model and module menus
parent
39adaf6337
commit
4b0893c87a
|
|
@ -21,19 +21,26 @@ class ControlNetUnit {
|
||||||
const module = getSelectedModule(index)
|
const module = getSelectedModule(index)
|
||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
// static setModule(index) {
|
static setModule(index, module_item) {
|
||||||
// html_manip.menu
|
try {
|
||||||
// const module = getSelectedModule(index)
|
const module_menu_id = 'mModulesMenuControlNet_' + index
|
||||||
// return module
|
html_manip.selectMenuItem(module_menu_id, module_item)
|
||||||
// }
|
} catch (e) {
|
||||||
|
console.warn(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
static getModel(index) {
|
static getModel(index) {
|
||||||
const model = getSelectedModel(index)
|
const model = getSelectedModel(index)
|
||||||
return model
|
return model
|
||||||
}
|
}
|
||||||
// static setModel(index) {
|
static setModel(index, model_item) {
|
||||||
// const model = getSelectedModel(index)
|
try {
|
||||||
// return model
|
const model_menu_id = 'mModelsMenuControlNet_' + index
|
||||||
// }
|
html_manip.selectMenuItem(model_menu_id, model_item)
|
||||||
|
} catch (e) {
|
||||||
|
console.warn(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
static getWeight(index = 0) {
|
static getWeight(index = 0) {
|
||||||
const weight = getWeight(index)
|
const weight = getWeight(index)
|
||||||
return weight
|
return weight
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue