sd enhanced

This commit is contained in:
Saifeddine ALOUI 2024-05-13 23:58:11 +02:00
parent bdf68a19d1
commit c84eda3993

View File

@ -377,7 +377,10 @@ class LollmsSD:
width=512, width=512,
height=512, height=512,
restore_faces=True, restore_faces=True,
output_path=None
): ):
if output_path is None:
output_path = self.output_dir
infos = {} infos = {}
img_paths = [] img_paths = []
if len(files)>0: if len(files)>0:
@ -404,7 +407,7 @@ class LollmsSD:
info: dict info: dict
""" """
for img in generated.images: for img in generated.images:
img_paths.append(self.saveImage(img)) img_paths.append(self.saveImage(img, output_path))
infos = generated.info infos = generated.info
except Exception as ex: except Exception as ex:
ASCIIColors.error("Couldn't generate the image") ASCIIColors.error("Couldn't generate the image")
@ -431,7 +434,7 @@ class LollmsSD:
info: dict info: dict
""" """
for img in generated.images: for img in generated.images:
img_paths.append(self.saveImage(img)) img_paths.append(self.saveImage(img, output_path))
infos = generated.info infos = generated.info
except Exception as ex: except Exception as ex:
ASCIIColors.error("Couldn't generate the image") ASCIIColors.error("Couldn't generate the image")