Merge pull request #12717 from brkirch/make-temp-directory

Create Gradio temp directory if necessary
This commit is contained in:
AUTOMATIC1111 2023-08-22 07:30:25 +03:00 committed by GitHub
commit 7da73cbcca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -44,6 +44,8 @@ def save_pil_to_file(self, pil_image, dir=None, format="png"):
if shared.opts.temp_dir != "":
dir = shared.opts.temp_dir
else:
os.makedirs(dir, exist_ok=True)
use_metadata = False
metadata = PngImagePlugin.PngInfo()