mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-27 07:39:53 +08:00
Merge pull request #11006 from Vesnica/patch-1
Make save_pil_to_file to have same parameters with gradio's function
This commit is contained in:
commit
7f28e8c445
@ -31,7 +31,7 @@ def check_tmp_file(gradio, filename):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def save_pil_to_file(self, pil_image, dir=None):
|
def save_pil_to_file(self, pil_image, dir=None, format="png"):
|
||||||
already_saved_as = getattr(pil_image, 'already_saved_as', None)
|
already_saved_as = getattr(pil_image, 'already_saved_as', None)
|
||||||
if already_saved_as and os.path.isfile(already_saved_as):
|
if already_saved_as and os.path.isfile(already_saved_as):
|
||||||
register_tmp_file(shared.demo, already_saved_as)
|
register_tmp_file(shared.demo, already_saved_as)
|
||||||
|
Loading…
Reference in New Issue
Block a user