We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa12dfa commit bb11beeCopy full SHA for bb11bee
modules/ui_tempdir.py
@@ -14,7 +14,7 @@
14
15
def save_pil_to_file(pil_image, dir=None):
16
already_saved_as = getattr(pil_image, 'already_saved_as', None)
17
- if already_saved_as:
+ if already_saved_as and os.path.isfile(already_saved_as):
18
shared.demo.temp_dirs = shared.demo.temp_dirs | {os.path.abspath(os.path.dirname(already_saved_as))}
19
file_obj = Savedfile(already_saved_as)
20
return file_obj
0 commit comments