stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Base output path off data path

Open w-e-w opened this issue 7 months ago • 0 comments

Description

alternative implementation of https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/14443 Added shared.cmd_opts.data_dir prefix to "outputs" and "log" paths.

achieve the same thing with minor differences being

  1. the default path is truncated if it's a child's of CWD this has the advantage of making existing config.json more usable if webui is moved
  2. using the path separator of the respective of OS

other minor change

  1. create a path truncate utility function truncate_path()
  2. create a new paths_internal var default_output_dir (I guess this can be reused by extensions)
  3. also use this utility function for def webpath(fn) simplifying it (I know I probably shouldn't have bundle this one in this PR)

Implications

this change could potentially have a minor impact on existing users if the user decides to create a new configuration file and happens to be using --data-dir but they also wish for some reason the output to be in the webui root these user will have to set the output to webui root manually

but for existing users that are using existing configuration file there will be no impact, as this only changes the default output path not the current path

Checklist:

w-e-w avatar Dec 27 '23 21:12 w-e-w