code: def imports():
      logging.getLogger("torch.distributed.nn").setLevel(
          logging.ERROR
      )  # sshh...
      logging.getLogger("xformers").addFilter(
          lambda record: "A matching Triton is not available"
          not in record.getMessage()
      )
  
      import torch  # noqa: F401
  
      startup_timer.record("import torch")
      import pytorch_lightning  # noqa: F401
  
      startup_timer.record("import torch")
      warnings.filterwarnings(
          action="ignore",
          category=DeprecationWarning,
          module="pytorch_lightning",
      )
      warnings.filterwarnings(
          action="ignore", category=UserWarning, module="torchvision"
      )
  
      import gradio  # noqa: F401
  
      startup_timer.record("import gradio")
  
      from modules import (
          paths,
          timer,
          import_hook,
          errors,
      )  # noqa: F401
  
      startup_timer.record("setup paths")
  
      import ldm.modules.encoders.modules  # noqa: F401
  
      startup_timer.record("import ldm")
  
      import sgm.modules.encoders.modules  # noqa: F401
  
      startup_timer.record("import sgm")
  
      from modules import shared_init
  
      shared_init.initialize()
      startup_timer.record("initialize shared")
  
      from modules import processing, gradio_extensons, ui  # noqa: F401
  
      startup_timer.record("other imports")
  
file_path: stable-diffusion-webui/modules/initialize.py
imports: import importlib
  import logging
  import sys
  import warnings
  from threading import Thread
  from modules.timer import startup_timer
label_desc: Use image node_id 1 for calling a global function with example usage: imports() without return types