Fix model merger tab initialization

This commit is contained in:
JeLuF 2023-02-13 00:30:06 +01:00
parent dd21c07d4a
commit 8431395326

View File

@ -333,19 +333,13 @@
const tabSettingsBatch = document.querySelector('#tab-merge-opts-batch') const tabSettingsBatch = document.querySelector('#tab-merge-opts-batch')
linkTabContents(tabSettingsSingle) linkTabContents(tabSettingsSingle)
linkTabContents(tabSettingsBatch) linkTabContents(tabSettingsBatch)
let mergeModelAField = new ModelDropdown(document.querySelector('#mergeModelA'), 'stable-diffusion')
let mergeModelBField = new ModelDropdown(document.querySelector('#mergeModelB'), 'stable-diffusion')
/////////////////////// Event Listener /////////////////////// Event Listener
document.addEventListener('tabClick', (e) => { document.addEventListener('tabClick', (e) => {
if (e.detail.name == 'merge') { if (e.detail.name == 'merge') {
console.log('Activate') console.log('Activate')
// let modelList = stableDiffusionModelField.cloneNode(true) let mergeModelAField = new ModelDropdown(document.querySelector('#mergeModelA'), 'stable-diffusion')
// modelList.id = "mergeModelA" let mergeModelBField = new ModelDropdown(document.querySelector('#mergeModelB'), 'stable-diffusion')
// document.querySelector("#mergeModelA").replaceWith(modelList)
// modelList = stableDiffusionModelField.cloneNode(true)
// modelList.id = "mergeModelB"
// document.querySelector("#mergeModelB").replaceWith(modelList)
updateChart() updateChart()
} }
}) })