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 all components inside a gradio block x to the registry of tracked components
docstr_tok: ["adds","all","components","inside","a","gradio","block","x","to","the","registry","of","tracked","components"]
code: def add_block(self, x, path=""):
      """adds all components inside a gradio block x to the registry of tracked components"""
  
      if hasattr(x, "children"):
          if isinstance(x, gr.Tabs) and x.elem_id is not None:
              # Tabs element can't have a label, have to use elem_id instead
              self.add_component(f"{path}/Tabs@{x.elem_id}", x)
          for c in x.children:
              self.add_block(c, path)
      elif x.label is not None:
          self.add_component(f"{path}/{x.label}", x)
      elif isinstance(x, gr.Button) and x.value is not None:
          self.add_component(f"{path}/{x.value}", x)
  
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 3 for calling the UiLoadsave obj's underlying member method code with example usage: obj.add_block(x, path) without return types