class_docstr: Creates a top row UI with prompts, generate button, styles, extra little buttons for things, and enables some functionality related to their operation
class_docstr_tok: ["Creates","a","top","row","UI","with","prompts",",","generate","button",",","styles",",","extra","little","buttons","for","things",",","and","enables","some","functionality","related","to","their","operation"]
code: def __init__(self, is_img2img, is_compact=False, id_part=None):
      if id_part is None:
          id_part = "img2img" if is_img2img else "txt2img"
  
      self.id_part = id_part
      self.is_img2img = is_img2img
      self.is_compact = is_compact
  
      if not is_compact:
          with gr.Row(elem_id=f"{id_part}_toprow", variant="compact"):
              self.create_classic_toprow()
      else:
          self.create_submit_box()
  
file_path: stable-diffusion-webui/modules/ui_toprow.py
imports: import gradio
  from modules import shared, ui_prompt_styles
  import modules.images
  from modules.ui_components import ToolButton
label_desc: Use image node_id 1 to create a new Toprow object  with example: obj = Toprow(is_img2img, is_compact, id_part)