Disable LoRA in the main branch

This commit is contained in:
cmdr2 2023-04-04 16:14:07 +05:30
parent e807bcdf90
commit 84737eb271

View File

@ -321,11 +321,11 @@ async function getAppConfig() {
if (config.net && config.net.listen_port !== undefined) {
listenPortField.value = config.net.listen_port
}
if (config.test_diffusers === undefined) {
if (config.test_diffusers === undefined || config.update_branch === 'main') {
document.querySelector("#lora_model_container").style.display = 'none'
document.querySelector("#lora_alpha_container").style.display = 'none'
} else {
testDiffusers.checked = config.test_diffusers && config.update_branch === 'beta'
testDiffusers.checked = config.test_diffusers && config.update_branch !== 'main'
document.querySelector("#lora_model_container").style.display = (testDiffusers.checked ? '' : 'none')
document.querySelector("#lora_alpha_container").style.display = (testDiffusers.checked && loraModelField.value !== "" ? '' : 'none')
}