Add cli arg to override user directory (#4856)

* Override user directory.

* Use overridden user directory.

* Remove prints.

* Remove references to global user_files.

* Remove unused replace_folder function.

* Remove newline.

* Remove global during get_user_directory.

* Add validation.
This commit is contained in:
Robin Huang
2024-09-12 21:10:27 +09:00
committed by GitHub
parent d0b7ab88ba
commit b962db9952
4 changed files with 23 additions and 8 deletions

View File

@@ -171,6 +171,8 @@ parser.add_argument(
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: