plugins add dropdown menu; realesrgan support 2x 4x

This commit is contained in:
Qing
2023-03-25 13:39:56 +08:00
parent a5997e9332
commit 003a104406
9 changed files with 877 additions and 149 deletions

View File

@@ -153,12 +153,16 @@ export function modelDownloaded(name: string) {
export async function runPlugin(
name: string,
imageFile: File,
upscale?: number,
maskFile?: File | null,
clicks?: number[][]
) {
const fd = new FormData()
fd.append('name', name)
fd.append('image', imageFile)
if (upscale) {
fd.append('upscale', upscale.toString())
}
if (clicks) {
fd.append('clicks', JSON.stringify(clicks))
}