mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-17 20:00:59 +02:00
First working version of dynamic backends, with Forge and ed_diffusers (v3) and ed_classic (v2). Does not auto-install Forge yet
This commit is contained in:
@ -981,7 +981,20 @@ function onRedoFilter(req, img, e, tools) {
|
||||
function onUpscaleClick(req, img, e, tools) {
|
||||
let path = upscaleModelField.value
|
||||
let scale = parseInt(upscaleAmountField.value)
|
||||
let filterName = path.toLowerCase().includes("realesrgan") ? "realesrgan" : "latent_upscaler"
|
||||
|
||||
let filterName = null
|
||||
const FILTERS = ["realesrgan", "latent_upscaler", "esrgan_4x", "lanczos", "nearest", "scunet", "swinir"]
|
||||
for (let idx in FILTERS) {
|
||||
let f = FILTERS[idx]
|
||||
if (path.toLowerCase().includes(f)) {
|
||||
filterName = f
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if (!filterName) {
|
||||
return
|
||||
}
|
||||
let statusText = "Upscaling by " + scale + "x using " + filterName
|
||||
applyInlineFilter(filterName, path, { scale: scale }, img, statusText, tools)
|
||||
}
|
||||
|
Reference in New Issue
Block a user