code: def on_ui_settings():
      import gradio as gr
  
      options = {
          "hypertile_explanation": shared.OptionHTML(
              """
      <a href='https://github.com/tfernd/HyperTile'>Hypertile</a> optimizes the self-attention layer within U-Net and VAE models,
      resulting in a reduction in computation time ranging from 1 to 4 times. The larger the generated image is, the greater the
      benefit.
      """
          ),
          "hypertile_enable_unet": shared.OptionInfo(
              False,
              "Enable Hypertile U-Net",
              infotext="Hypertile U-Net",
          ).info(
              "enables hypertile for all modes, including hires fix second pass; noticeable change in details of the generated picture"
          ),
          "hypertile_enable_unet_secondpass": shared.OptionInfo(
              False,
              "Enable Hypertile U-Net for hires fix second pass",
              infotext="Hypertile U-Net second pass",
          ).info(
              "enables hypertile just for hires fix second pass - regardless of whether the above setting is enabled"
          ),
          "hypertile_max_depth_unet": shared.OptionInfo(
              3,
              "Hypertile U-Net max depth",
              gr.Slider,
              {"minimum": 0, "maximum": 3, "step": 1},
              infotext="Hypertile U-Net max depth",
          ).info(
              "larger = more neural network layers affected; minor effect on performance"
          ),
          "hypertile_max_tile_unet": shared.OptionInfo(
              256,
              "Hypertile U-Net max tile size",
              gr.Slider,
              {"minimum": 0, "maximum": 512, "step": 16},
              infotext="Hypertile U-Net max tile size",
          ).info("larger = worse performance"),
          "hypertile_swap_size_unet": shared.OptionInfo(
              3,
              "Hypertile U-Net swap size",
              gr.Slider,
              {"minimum": 0, "maximum": 64, "step": 1},
              infotext="Hypertile U-Net swap size",
          ),
          "hypertile_enable_vae": shared.OptionInfo(
              False, "Enable Hypertile VAE", infotext="Hypertile VAE"
          ).info("minimal change in the generated picture"),
          "hypertile_max_depth_vae": shared.OptionInfo(
              3,
              "Hypertile VAE max depth",
              gr.Slider,
              {"minimum": 0, "maximum": 3, "step": 1},
              infotext="Hypertile VAE max depth",
          ),
          "hypertile_max_tile_vae": shared.OptionInfo(
              128,
              "Hypertile VAE max tile size",
              gr.Slider,
              {"minimum": 0, "maximum": 512, "step": 16},
              infotext="Hypertile VAE max tile size",
          ),
          "hypertile_swap_size_vae": shared.OptionInfo(
              3,
              "Hypertile VAE swap size ",
              gr.Slider,
              {"minimum": 0, "maximum": 64, "step": 1},
              infotext="Hypertile VAE swap size",
          ),
      }
  
      for name, opt in options.items():
          opt.section = ("hypertile", "Hypertile")
          shared.opts.add_option(name, opt)
  
file_path: stable-diffusion-webui/extensions-builtin/hypertile/scripts/hypertile_script.py
imports: import hypertile
  from modules import scripts, script_callbacks, shared
  from scripts.hypertile_xyz import add_axis_options
label_desc: Use image node_id 2 for calling a global function with example usage: on_ui_settings() without return types