Default settings for TensorRT demo; Don't show splash screen for diffusers

This commit is contained in:
cmdr2 2023-08-01 12:43:23 +05:30
parent d39e1da183
commit 4cee1be99c
2 changed files with 16 additions and 1 deletions

View File

@ -706,7 +706,7 @@ async function init() {
ping: onPing
}
})
splashScreen()
// splashScreen()
// load models again, but scan for malicious this time
await getModels(true)

View File

@ -2271,6 +2271,8 @@ function tunnelUpdate(event) {
}
}
let trtSettingsForced = false
function packagesUpdate(event) {
let trtBtn = document.getElementById("toggle-tensorrt-install")
let trtInstalled = "packages_installed" in event && "tensorrt" in event["packages_installed"]
@ -2285,6 +2287,19 @@ function packagesUpdate(event) {
if (document.getElementById("toggle-tensorrt-install").innerHTML == "Uninstall") {
document.querySelector("#enable_trt_config").classList.remove("displayNone")
if (!trtSettingsForced) {
// settings for demo
promptField.value = "Dragons fighting with a knight, castle, war scene, fantasy, cartoon, flames, HD"
seedField.value = 3187947173
widthField.value = 1024
heightField.value = 768
randomSeedField.checked = false
seedField.disabled = false
stableDiffusionModelField.value = "sd-v1-4"
trtSettingsForced = true
}
}
}