Option to input directory
diff --git a/comfy/cli_args.py b/comfy/cli_args.py
index ffae81c49d..35d44164f1 100644
--- a/comfy/cli_args.py
+++ b/comfy/cli_args.py
@@ -39,6 +39,7 @@ def __call__(self, parser, namespace, values, option_string=None):
 parser.add_argument("--extra-model-paths-config", type=str, default=None, metavar="PATH", nargs='+', action='append', help="Load one or more extra_model_paths.yaml files.")
 parser.add_argument("--output-directory", type=str, default=None, help="Set the ComfyUI output directory.")
 parser.add_argument("--temp-directory", type=str, default=None, help="Set the ComfyUI temp directory (default is in the ComfyUI directory).")
+parser.add_argument("--input-directory", type=str, default=None, help="Set the ComfyUI input directory.")
 parser.add_argument("--auto-launch", action="store_true", help="Automatically launch ComfyUI in the default browser.")
 parser.add_argument("--disable-auto-launch", action="store_true", help="Disable auto launching the browser.")
 parser.add_argument("--cuda-device", type=int, default=None, metavar="DEVICE_ID", help="Set the id of the cuda device this instance will use.")
diff --git a/folder_paths.py b/folder_paths.py
index 4a10c68e7e..898513b0e1 100644
--- a/folder_paths.py
+++ b/folder_paths.py
@@ -46,6 +46,10 @@ def set_temp_directory(temp_dir):
     global temp_directory
     temp_directory = temp_dir
 
+def set_input_directory(input_dir):
+    global input_directory
+    input_directory = input_dir
+
 def get_output_directory():
     global output_directory
     return output_directory
diff --git a/main.py b/main.py
index 7c5eaee0a8..875ea1aa90 100644
--- a/main.py
+++ b/main.py
@@ -175,6 +175,11 @@ def load_extra_path_config(yaml_path):
         print(f"Setting output directory to: {output_dir}")
         folder_paths.set_output_directory(output_dir)
 
+    if args.input_directory:
+        input_dir = os.path.abspath(args.input_directory)
+        print(f"Setting input directory to: {input_dir}")
+        folder_paths.set_input_directory(input_dir)
+
     if args.quick_test_for_ci:
         exit(0)
 

There are options to set the output and temp directory, but the option for the input directory is missing, so this PR adds it.