aboutsummaryrefslogtreecommitdiff
path: root/modules/shared.py
diff options
context:
space:
mode:
authorcamenduru <54370274+camenduru@users.noreply.github.com>2022-09-13 22:18:07 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2022-09-14 08:48:42 +0300
commitf07d789b79309994b65203eb5f82b3040c33bf15 (patch)
tree6b6f1dd4b7b004e33370adfb001fe326f217072e /modules/shared.py
parent66b09bbfecddb01573d7f3e8fcd92d38a7221cf0 (diff)
added cmd arg to load custom styles file
Diffstat (limited to 'modules/shared.py')
-rw-r--r--modules/shared.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/shared.py b/modules/shared.py
index bc39ad1c..372569b5 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -45,6 +45,7 @@ parser.add_argument("--ui-settings-file", type=str, help="filename to use for ui
parser.add_argument("--gradio-debug", action='store_true', help="launch gradio with --debug option")
parser.add_argument("--gradio-auth", type=str, help='set gradio authentication like "username:password"; or comma-delimit multiple like "u1:p1,u2:p2,u3:p3"', default=None)
parser.add_argument("--opt-channelslast", action='store_true', help="change memory type for stable diffusion to channels last")
+parser.add_argument("--styles-file", type=str, help="filename to use for styles", default=os.path.join(script_path, 'styles.csv'))
cmd_opts = parser.parse_args()
@@ -79,7 +80,7 @@ state = State()
artist_db = modules.artists.ArtistsDatabase(os.path.join(script_path, 'artists.csv'))
-styles_filename = os.path.join(script_path, 'styles.csv')
+styles_filename = cmd_opts.styles_file
prompt_styles = modules.styles.load_styles(styles_filename)
interrogator = modules.interrogate.InterrogateModels("interrogate")