code: def model_fn(model_dir):
      # Load stable diffusion and move it to the GPU
      pipe = StableDiffusionPipeline.from_pretrained(
          model_dir, torch_dtype=torch.float16
      )
      pipe = pipe.to("cuda")
  
      return pipe
  
imports: import base64
  import torch
  from io import BytesIO
  from diffusers import StableDiffusionPipeline
label_desc: Use image node_id 1 for calling a global function with example usage: model_fn(model_dir) and returns: pipe