ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Environment variables in paths are not expanded

Open memoakten opened this issue 1 year ago • 0 comments

Expected Behavior

Environment variables in paths are not expanded

  1. in extra_model_paths.yaml base_path: $DATA_PATH\models

Should be expanded internally to whatever the environment variable $DATA_PATH references, with os.path.expanduser(os.path.expandvars(...)) (This is OS agnostic, because in python environment variables are always prefixed with $ no matter the OS)

  1. The same issue also happens in command line args. e.g. python main.py --input-directory "$DATA_PATH\inputs" is not expanded. However there is a work around for this by expanding before passing. E.g. python main.py --input-directory "%DATA_PATH%\inputs". But there is no workaround for expanding the yaml contents.

Actual Behavior

See above

Steps to Reproduce

See above

Debug Logs

See above

Other

No response

memoakten avatar Aug 09 '24 17:08 memoakten