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

Added --models-dir option

Open MarcusNyne opened this issue 1 year ago • 0 comments

Problem Statement

The --data-dir option sets the extensions and model folders for automatic1111. This can be problematic if a user wishes to have a common models folder, but continue to maintain extensions in the application folder. An option has been added that allows the models folder to be set independently while preserving the current functionality of --data-dir for backwards compatibility.

Users who maintain multiple installations or are regularly trying new extensions will find this feature useful.

Summary

The --model-dir option overrides the location of the models directory for stable diffusion, so that models can be shared across multiple installations. When --data-dir is specified alone, both the extensions and models folders are present in this folder. --models-dir can be used independently, but when used with --data-dir, models are found in --models-dir, and extensions are under --data-dir.

Description

  • Add a command line option for setting the models folder independently from the extensions folder
  • --models-dir was added as a command line option to modules/cmd_args.py
  • all other changes in modules/paths_internal.py:
  • no changes to functionality when --models-dir is not used
  • when used alone, --models-dir specifies where to look for models folders
  • when used with --data-dir, extensions are found in data-dir, but models are found in models-dir

Screenshots/videos:

Checklist:

Tested with all permutations:

  • no options specified
  • --data-dir alone
  • --models-dir alone
  • --data-dir and --models-dir together

MarcusNyne avatar May 08 '24 21:05 MarcusNyne