aboutsummaryrefslogtreecommitdiff
path: root/modules/ui_tempdir.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-08-09 18:11:13 +0300
committerAUTOMATIC1111 <16777216c@gmail.com>2023-08-09 18:11:13 +0300
commit95821f0132f5437ef30b0dbcac7c51e55818c18f (patch)
tree3022dbbbdab5329e8d07538637545fe4965867d4 /modules/ui_tempdir.py
parenta2a97e57f069d24c9616d1867a6df7f532f92a04 (diff)
split webui.py's initialization and utility functions into separate files
Diffstat (limited to 'modules/ui_tempdir.py')
-rw-r--r--modules/ui_tempdir.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/ui_tempdir.py b/modules/ui_tempdir.py
index fb75137e..506017e5 100644
--- a/modules/ui_tempdir.py
+++ b/modules/ui_tempdir.py
@@ -57,8 +57,9 @@ def save_pil_to_file(self, pil_image, dir=None, format="png"):
return file_obj.name
-# override save to file function so that it also writes PNG info
-gradio.components.IOComponent.pil_to_temp_file = save_pil_to_file
+def install_ui_tempdir_override():
+ """override save to file function so that it also writes PNG info"""
+ gradio.components.IOComponent.pil_to_temp_file = save_pil_to_file
def on_tmpdir_changed():