mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-18 20:27:58 +00:00
Update lollms_sd.py
This commit is contained in:
parent
372a474cf6
commit
95646652b5
@ -524,8 +524,12 @@ class LollmsSD(LollmsTTI):
|
||||
def saveImage(self, image:Image, save_folder=None):
|
||||
if save_folder is None:
|
||||
save_folder = self.output_dir
|
||||
save_folder = Path(save_folder)
|
||||
if not save_folder.is_dir():
|
||||
image_name = self.get_available_image_name(save_folder, self.wm)
|
||||
image_path = os.path.join(save_folder, image_name)
|
||||
else:
|
||||
image_path = save_folder
|
||||
image.save(image_path)
|
||||
return image_path
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user