Add output folder icons
diff --git a/javascript/hints.js b/javascript/hints.js
index 59dd770c790..96cd24d5df7 100644
--- a/javascript/hints.js
+++ b/javascript/hints.js
@@ -15,6 +15,7 @@ titles = {
     "\u267b\ufe0f": "Reuse seed from last generation, mostly useful if it was randomed",
     "\u{1f3a8}": "Add a random artist to the prompt.",
     "\u2199\ufe0f": "Read generation parameters from prompt into user interface.",
+    "\uD83D\uDCC2": "Open images output directory",
 
     "Inpaint a part of image": "Draw a mask over an image, and the script will regenerate the masked area with content according to prompt",
     "SD upscale": "Upscale image normally, split result into tiles, improve each tile using img2img, merge whole image back",
diff --git a/modules/ui.py b/modules/ui.py
index e96109c9c59..3d2032b4d05 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -9,6 +9,8 @@
 import sys
 import time
 import traceback
+import platform
+import subprocess as sp
 
 import numpy as np
 import torch
@@ -60,7 +62,7 @@ def gr_show(visible=True):
 reuse_symbol = '\u267b\ufe0f'  # ♻️
 art_symbol = '\U0001f3a8'  # 🎨
 paste_symbol = '\u2199\ufe0f'  # ↙
-
+folder_symbol = '\uD83D\uDCC2'
 
 def plaintext_to_html(text):
     text = "<p>" + "<br>\n".join([f"{html.escape(x)}" for x in text.split('\n')]) + "</p>"
@@ -449,6 +451,8 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo, run_modelmerger):
                         send_to_img2img = gr.Button('Send to img2img')
                         send_to_inpaint = gr.Button('Send to inpaint')
                         send_to_extras = gr.Button('Send to extras')
+                        button_id = "hidden_element" if shared.cmd_opts.hide_ui_dir_config else 'open_folder'
+                        open_txt2img_folder = gr.Button(folder_symbol, elem_id=button_id)
 
                 with gr.Group():
                     html_info = gr.HTML()
@@ -625,6 +629,8 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo, run_modelmerger):
                         img2img_send_to_img2img = gr.Button('Send to img2img')
                         img2img_send_to_inpaint = gr.Button('Send to inpaint')
                         img2img_send_to_extras = gr.Button('Send to extras')
+                        button_id = "hidden_element" if shared.cmd_opts.hide_ui_dir_config else 'open_folder'
+                        open_img2img_folder = gr.Button(folder_symbol, elem_id=button_id)
 
                 with gr.Group():
                     html_info = gr.HTML()
@@ -797,6 +803,8 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo, run_modelmerger):
                 html_info = gr.HTML()
                 extras_send_to_img2img = gr.Button('Send to img2img')
                 extras_send_to_inpaint = gr.Button('Send to inpaint')
+                button_id = "hidden_element" if shared.cmd_opts.hide_ui_dir_config else ''
+                open_extras_folder = gr.Button('Open output directory', elem_id=button_id)
 
         submit.click(
             fn=run_extras,
@@ -905,6 +913,16 @@ def fun():
 
     components = []
 
+    def open_folder(f):
+        if not shared.cmd_opts.hide_ui_dir_config:
+            path = os.path.normpath(f)
+            if platform.system() == "Windows":
+                os.startfile(path)
+            elif platform.system() == "Darwin":
+                sp.Popen(["open", path])
+            else:
+                sp.Popen(["xdg-open", path])
+
     def run_settings(*args):
         changed = 0
 
@@ -1048,6 +1066,24 @@ def run_settings(*args):
             outputs=[extras_image],
         )
 
+        open_txt2img_folder.click(
+            fn=lambda: open_folder(opts.outdir_samples or opts.outdir_txt2img_samples),
+            inputs=[],
+            outputs=[],
+        )
+
+        open_img2img_folder.click(
+            fn=lambda: open_folder(opts.outdir_samples or opts.outdir_img2img_samples),
+            inputs=[],
+            outputs=[],
+        )
+
+        open_extras_folder.click(
+            fn=lambda: open_folder(opts.outdir_samples or opts.outdir_extras_samples),
+            inputs=[],
+            outputs=[],
+        )
+
         img2img_send_to_extras.click(
             fn=lambda x: image_from_url_text(x),
             _js="extract_image_from_gallery_extras",
diff --git a/style.css b/style.css
index 4054e2dfc83..8973ecfce58 100644
--- a/style.css
+++ b/style.css
@@ -1,5 +1,11 @@
 .output-html p {margin: 0 0.5em;}
 
+.row > *,
+.row > .gr-form > * {
+    min-width: min(120px, 100%);
+    flex: 1 1 0%;
+}
+
 .performance {
     font-size: 0.85em;
     color: #444;
@@ -43,13 +49,17 @@
     margin-right: auto;
 }
 
-#random_seed, #random_subseed, #reuse_seed, #reuse_subseed{
+#random_seed, #random_subseed, #reuse_seed, #reuse_subseed, #open_folder{
     min-width: auto;
     flex-grow: 0;
     padding-left: 0.25em;
     padding-right: 0.25em;
 }
 
+#hidden_element{
+    display: none;
+}
+
 #seed_row, #subseed_row{
     gap: 0.5rem;
 }

Adds icons on the first 3 tabs to directly open the corresponding images output directory. 