From 08f93da17c020e126729c718079600b5522a5473 Mon Sep 17 00:00:00 2001 From: Vesnica Date: Sun, 4 Jun 2023 14:20:23 +0800 Subject: [PATCH] Update ui_tempdir.py Make override function have the same input parameters with original function --- modules/ui_tempdir.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ui_tempdir.py b/modules/ui_tempdir.py index 9fc7d764..fb75137e 100644 --- a/modules/ui_tempdir.py +++ b/modules/ui_tempdir.py @@ -31,7 +31,7 @@ def check_tmp_file(gradio, filename): 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) if already_saved_as and os.path.isfile(already_saved_as): register_tmp_file(shared.demo, already_saved_as)