aboutsummaryrefslogtreecommitdiffstats
path: root/modules/api/api.py
diff options
context:
space:
mode:
authorBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-24 11:32:18 +0000
committerBruno Seoane <brunoseoaneamarillo@gmail.com>2022-10-24 11:32:18 +0000
commit595dca85af9e26b5d76cd64659a5bdd9da4f2b89 (patch)
tree23c88ac8038123d9acf0c19c029c7fc4865ef155 /modules/api/api.py
parent90f02c75220d187e075203a4e3b450bfba392c4d (diff)
downloadstable-diffusion-webui-gfx803-595dca85af9e26b5d76cd64659a5bdd9da4f2b89.tar.gz
stable-diffusion-webui-gfx803-595dca85af9e26b5d76cd64659a5bdd9da4f2b89.tar.bz2
stable-diffusion-webui-gfx803-595dca85af9e26b5d76cd64659a5bdd9da4f2b89.zip
Reverse run_extras change
Update serialization on the batch images endpoint
Diffstat (limited to 'modules/api/api.py')
-rw-r--r--modules/api/api.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/api/api.py b/modules/api/api.py
index 799e3701..67b783de 100644
--- a/modules/api/api.py
+++ b/modules/api/api.py
@@ -109,7 +109,12 @@ class Api:
def extras_batch_images_api(self, req: ExtrasBatchImagesRequest):
reqDict = setUpscalers(req)
- reqDict['image_folder'] = list(map(decode_base64_to_file, reqDict['imageList']))
+ def prepareFiles(file):
+ file = decode_base64_to_file(file.data, file_path=file.name)
+ file.orig_name = file.name
+ return file
+
+ reqDict['image_folder'] = list(map(prepareFiles, reqDict['imageList']))
reqDict.pop('imageList')
with self.queue_lock: