code: def ui(self, is_img2img):
      gr.HTML("<br />")
      with gr.Row():
          with gr.Column():
              put_at_start = gr.Checkbox(
                  label="Put variable parts at start of prompt",
                  value=False,
                  elem_id=self.elem_id("put_at_start"),
              )
              different_seeds = gr.Checkbox(
                  label="Use different seed for each picture",
                  value=False,
                  elem_id=self.elem_id("different_seeds"),
              )
          with gr.Column():
              prompt_type = gr.Radio(
                  ["positive", "negative"],
                  label="Select prompt",
                  elem_id=self.elem_id("prompt_type"),
                  value="positive",
              )
              variations_delimiter = gr.Radio(
                  ["comma", "space"],
                  label="Select joining char",
                  elem_id=self.elem_id("variations_delimiter"),
                  value="comma",
              )
          with gr.Column():
              margin_size = gr.Slider(
                  label="Grid margins (px)",
                  minimum=0,
                  maximum=500,
                  value=0,
                  step=2,
                  elem_id=self.elem_id("margin_size"),
              )
  
      return [
          put_at_start,
          different_seeds,
          prompt_type,
          variations_delimiter,
          margin_size,
      ]
  
file_path: stable-diffusion-webui/scripts/prompt_matrix.py
imports: import math
  import modules.scripts
  import gradio
  from modules import images
  from modules.processing import process_images
  from modules.shared import opts, state
  import modules.sd_samplers
label_desc: Use image node_id 2 for calling the Script obj's underlying member method code with example usage: obj.ui(is_img2img) and returns: list