code: def api_only():
      from fastapi import FastAPI
      from modules.shared_cmd_options import cmd_opts
  
      initialize.initialize()
  
      app = FastAPI()
      initialize_util.setup_middleware(app)
      api = create_api(app)
  
      from modules import script_callbacks
  
      script_callbacks.before_ui_callback()
      script_callbacks.app_started_callback(None, app)
  
      print(f"Startup time: {startup_timer.summary()}.")
      api.launch(
          server_name="0.0.0.0" if cmd_opts.listen else "127.0.0.1",
          port=cmd_opts.port if cmd_opts.port else 7861,
          root_path=f"/{cmd_opts.subpath}" if cmd_opts.subpath else "",
      )
  
file_path: stable-diffusion-webui/webui.py
imports: from __future__ import annotations
  import os
  import time
  from modules import timer
  from modules import initialize_util
  from modules import initialize
label_desc: Use image node_id 2 for calling a global function with example usage: api_only() without return types