code: def on_model_loaded(callback):
      """register a function to be called when the stable diffusion model is created; the model is
      passed as an argument; this function is also called when the script is reloaded.
      """
      add_callback(callback_map["callbacks_model_loaded"], callback)
  
imports: import inspect
  import os
  from collections import namedtuple
  from typing import Optional, Any
  from fastapi import FastAPI
  from gradio import Blocks
  from modules import errors, timer
label_desc: Use image node_id 28 for calling a global function with example usage: on_model_loaded(callback) without return types