stable-diffusion-webui
stable-diffusion-webui copied to clipboard
[Feature Request]: Use a dedicated `data` directory for input and output data
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What would your feature do ?
Instead of having directories like modules
and models
in the root directory, place them in data/input/models
, data/output/saved
etc, that would make running this in Docker way easier since I could just mount data
instead of every directory individually.
Even though mounting every directory individually is possible, you can only mount those of which you know of (which I did), but at some point I used a feature which created a new directory in the root directory, which I didn't mount since it wasn't there. That wouldn't have been a problem if it'd been created in data/output/new_random_dir
Proposed workflow
- Go to ....
- Press ....
- ...
Additional information
No response
you can specify most of those folders via cmd line flags. changing defaults would be extremely disruptive to entire install base. so which is less painful?
yea I found out the hard way after creating this issue, I didn't know there were that many cmd line flags, I only knew of those I found while browsing the code, I found it now in the wiki. Such important information should be in the README.md in the repo root imo.
Do you know if the model dirs (and all others) use the base path set with --data-dir? It's not mentioned in the default value (I'd have expect something like $DATA_DIR/models/<MODEL>). If it does then that's already the solution to this issue
that is the intention, but i haven't tested it if its implemented across the board.
# Parse the --data-dir flag first so we can use it as a base for our other argument default values
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument("--data-dir", type=str, default=os.path.dirname(os.path.dirname(os.path.realpath(__file__))), help="base path where all user data is stored",)
regarding cmd flags, you can always just run
python webui.py --help
some extensions register cmdflags later during init, so they wouldn't be included, but all core flags are there.
thanks