class_docstr: allows saving and restoring default values for gradio components
class_docstr_tok: ["allows","saving","and","restoring","default","values","for","gradio","components"]
docstr: adds logic to elements created with create_ui; all add_block class must be made before this
docstr_tok: ["adds","logic","to","elements","created","with","create_ui",";","all","add_block","class","must","be","made","before","this"]
code: def setup_ui(self):
      """adds logic to elements created with create_ui; all add_block class must be made before this"""
  
      assert not self.finalized_ui
      self.finalized_ui = True
  
      self.ui_defaults_view.click(
          fn=self.ui_view,
          inputs=list(self.component_mapping.values()),
          outputs=[self.ui_defaults_review],
      )
      self.ui_defaults_apply.click(
          fn=self.ui_apply,
          inputs=list(self.component_mapping.values()),
          outputs=[self.ui_defaults_review],
      )
  
file_path: stable-diffusion-webui/modules/ui_loadsave.py
imports: import json
  import os
  import gradio
  from modules import errors
  from modules.ui_components import ToolButton, InputAccordion
label_desc: Use image node_id 11 for calling the UiLoadsave obj's underlying member method code with example usage: obj.setup_ui() without return types