(req, img, e, tools)
| 1005 | } |
| 1006 | |
| 1007 | function onUpscaleClick(req, img, e, tools) { |
| 1008 | let path = upscaleModelField.value |
| 1009 | let scale = parseInt(upscaleAmountField.value) |
| 1010 | |
| 1011 | let filterName = null |
| 1012 | const FILTERS = ["realesrgan", "latent_upscaler", "esrgan_4x", "lanczos", "nearest", "scunet", "swinir"] |
| 1013 | for (let idx in FILTERS) { |
| 1014 | let f = FILTERS[idx] |
| 1015 | if (path.toLowerCase().includes(f)) { |
| 1016 | filterName = f |
| 1017 | break |
| 1018 | } |
| 1019 | } |
| 1020 | |
| 1021 | if (!filterName) { |
| 1022 | return |
| 1023 | } |
| 1024 | let statusText = "Upscaling by " + scale + "x using " + filterName |
| 1025 | applyInlineFilter(filterName, path, { scale: scale }, img, statusText, tools) |
| 1026 | } |
| 1027 | |
| 1028 | function onFixFacesClick(req, img, e, tools) { |
| 1029 | let path = gfpganModelField.value |
nothing calls this directly
no test coverage detected