mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Deprecate --laion400m and --weights arguments
Removes functionality for the --laion400m and --weights arguments and notifies user to use the --model argument instead.
This commit is contained in:
parent
a4f69e62d7
commit
68eabab2af
@ -19,23 +19,14 @@ def main():
|
|||||||
"""Initialize command-line parsers and the diffusion model"""
|
"""Initialize command-line parsers and the diffusion model"""
|
||||||
arg_parser = create_argv_parser()
|
arg_parser = create_argv_parser()
|
||||||
opt = arg_parser.parse_args()
|
opt = arg_parser.parse_args()
|
||||||
"""
|
|
||||||
if opt.laion400m:
|
if opt.laion400m:
|
||||||
# defaults suitable to the older latent diffusion weights
|
print('--laion400m flag has been deprecated. Please use --model laion400m instead.')
|
||||||
width = 256
|
sys.exit(-1)
|
||||||
height = 256
|
if opt.weights != 'model':
|
||||||
config = 'configs/latent-diffusion/txt2img-1p4B-eval.yaml'
|
print('--weights argument has been deprecated. Please configure /configs/models.yaml, and call it using --model instead.')
|
||||||
weights = 'models/ldm/text2img-large/model.ckpt'
|
sys.exit(-1)
|
||||||
else:
|
|
||||||
# some defaults suitable for stable diffusion weights
|
|
||||||
width = 512
|
|
||||||
height = 512
|
|
||||||
config = 'configs/stable-diffusion/v1-inference.yaml'
|
|
||||||
if '.ckpt' in opt.weights:
|
|
||||||
weights = opt.weights
|
|
||||||
else:
|
|
||||||
weights = f'models/ldm/stable-diffusion-v1/{opt.weights}.ckpt'
|
|
||||||
"""
|
|
||||||
try:
|
try:
|
||||||
models = OmegaConf.load('configs/models.yaml')
|
models = OmegaConf.load('configs/models.yaml')
|
||||||
width = models[opt.model].width
|
width = models[opt.model].width
|
||||||
@ -44,6 +35,7 @@ def main():
|
|||||||
weights = models[opt.model].weights
|
weights = models[opt.model].weights
|
||||||
except (FileNotFoundError, IOError, KeyError) as e:
|
except (FileNotFoundError, IOError, KeyError) as e:
|
||||||
print(f'{e}. Aborting.')
|
print(f'{e}. Aborting.')
|
||||||
|
sys.exit(-1)
|
||||||
|
|
||||||
print('* Initializing, be patient...\n')
|
print('* Initializing, be patient...\n')
|
||||||
sys.path.append('.')
|
sys.path.append('.')
|
||||||
@ -555,4 +547,4 @@ def create_cmd_parser():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user