Skip to content

Commit

Permalink
Add validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Sep 12, 2024
1 parent a470108 commit da98c01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion comfy/cli_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ def __call__(self, parser, namespace, values, option_string=None):
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("--user-directory", type=str, default=None, help="Set the ComfyUI user 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.")
Expand Down Expand Up @@ -172,6 +171,8 @@ def is_valid_directory(path: Optional[str]) -> Optional[str]:
help="The local filesystem path to the directory where the frontend is located. Overrides --front-end-version.",
)

parser.add_argument("--user-directory", type=is_valid_directory, default=None, help="Set the ComfyUI user directory with an absolute path.")

if comfy.options.args_parsing:
args = parser.parse_args()
else:
Expand Down

0 comments on commit da98c01

Please sign in to comment.