setters for controlnet's model and module menus

pull/158/head
Abdullah Alfaraj 2023-03-11 01:03:21 +03:00
parent 39adaf6337
commit 4b0893c87a
1 changed files with 16 additions and 9 deletions

View File

@ -21,19 +21,26 @@ class ControlNetUnit {
const module = getSelectedModule(index)
return module
}
// static setModule(index) {
// html_manip.menu
// const module = getSelectedModule(index)
// return module
// }
static setModule(index, module_item) {
try {
const module_menu_id = 'mModulesMenuControlNet_' + index
html_manip.selectMenuItem(module_menu_id, module_item)
} catch (e) {
console.warn(e)
}
}
static getModel(index) {
const model = getSelectedModel(index)
return model
}
// static setModel(index) {
// const model = getSelectedModel(index)
// return model
// }
static setModel(index, model_item) {
try {
const model_menu_id = 'mModelsMenuControlNet_' + index
html_manip.selectMenuItem(model_menu_id, model_item)
} catch (e) {
console.warn(e)
}
}
static getWeight(index = 0) {
const weight = getWeight(index)
return weight