mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
add an argument that lets user specify folders to scan for weights (#1977)
* add an argument that lets user specify folders to scan for weights This PR adds a `--weight_folders` argument to invoke.py. Using argparse, it adds a "weight_folders" attribute to the Args object, and can be used like this: ``` '''test.py''' from ldm.invoke.args import Args args = Args().parse_args() for folder in args.weight_folders: print(folder) ``` Example output: ``` python test.py --weight_folders /tmp/weights /home/fred/invokeai/weights "./my folder with spaces/weight files" /tmp/weights /home/fred/invokeai/weights ./my folder with spaces/weight files ``` * change --weight_folders to --weight_dirs
This commit is contained in:
parent
2aa5bb6aad
commit
de7abce464
@ -431,6 +431,12 @@ class Args(object):
|
||||
'--model',
|
||||
help='Indicates which diffusion model to load (defaults to "default" stanza in configs/models.yaml)',
|
||||
)
|
||||
model_group.add_argument(
|
||||
'--weight_dirs',
|
||||
nargs='+',
|
||||
type=str,
|
||||
help='List of one or more directories that will be auto-scanned for new model weights to import',
|
||||
)
|
||||
model_group.add_argument(
|
||||
'--png_compression','-z',
|
||||
type=int,
|
||||
|
Loading…
Reference in New Issue
Block a user