From c84eda3993bdd57b9b01a65caa289cb28afba916 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Mon, 13 May 2024 23:58:11 +0200 Subject: [PATCH] sd enhanced --- lollms/services/sd/lollms_sd.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lollms/services/sd/lollms_sd.py b/lollms/services/sd/lollms_sd.py index 3fcea6a..7a52806 100644 --- a/lollms/services/sd/lollms_sd.py +++ b/lollms/services/sd/lollms_sd.py @@ -377,7 +377,10 @@ class LollmsSD: width=512, height=512, restore_faces=True, + output_path=None ): + if output_path is None: + output_path = self.output_dir infos = {} img_paths = [] if len(files)>0: @@ -404,7 +407,7 @@ class LollmsSD: info: dict """ for img in generated.images: - img_paths.append(self.saveImage(img)) + img_paths.append(self.saveImage(img, output_path)) infos = generated.info except Exception as ex: ASCIIColors.error("Couldn't generate the image") @@ -431,7 +434,7 @@ class LollmsSD: info: dict """ for img in generated.images: - img_paths.append(self.saveImage(img)) + img_paths.append(self.saveImage(img, output_path)) infos = generated.info except Exception as ex: ASCIIColors.error("Couldn't generate the image")