code: def configure_opts_onchange():
      from modules import (
          shared,
          sd_models,
          sd_vae,
          ui_tempdir,
          sd_hijack,
      )
      from modules.call_queue import wrap_queued_call
  
      shared.opts.onchange(
          "sd_model_checkpoint",
          wrap_queued_call(lambda: sd_models.reload_model_weights()),
          call=False,
      )
      shared.opts.onchange(
          "sd_vae",
          wrap_queued_call(lambda: sd_vae.reload_vae_weights()),
          call=False,
      )
      shared.opts.onchange(
          "sd_vae_overrides_per_model_preferences",
          wrap_queued_call(lambda: sd_vae.reload_vae_weights()),
          call=False,
      )
      shared.opts.onchange("temp_dir", ui_tempdir.on_tmpdir_changed)
      shared.opts.onchange("gradio_theme", shared.reload_gradio_theme)
      shared.opts.onchange(
          "cross_attention_optimization",
          wrap_queued_call(
              lambda: sd_hijack.model_hijack.redo_hijack(
                  shared.sd_model
              )
          ),
          call=False,
      )
      startup_timer.record("opts onchange")
  
file_path: stable-diffusion-webui/modules/initialize_util.py
imports: import json
  import os
  import signal
  import sys
  import re
  from modules.timer import startup_timer
label_desc: Use image node_id 9 for calling a global function with example usage: configure_opts_onchange() without return types