@@ -19,23 +19,14 @@ def main():
1919 """Initialize command-line parsers and the diffusion model"""
2020 arg_parser = create_argv_parser ()
2121 opt = arg_parser .parse_args ()
22- """
22+
2323 if opt .laion400m :
24- # defaults suitable to the older latent diffusion weights
25- width = 256
26- height = 256
27- config = 'configs/latent-diffusion/txt2img-1p4B-eval.yaml'
28- weights = 'models/ldm/text2img-large/model.ckpt'
29- else:
30- # some defaults suitable for stable diffusion weights
31- width = 512
32- height = 512
33- config = 'configs/stable-diffusion/v1-inference.yaml'
34- if '.ckpt' in opt.weights:
35- weights = opt.weights
36- else:
37- weights = f'models/ldm/stable-diffusion-v1/{opt.weights}.ckpt'
38- """
24+ print ('--laion400m flag has been deprecated. Please use --model laion400m instead.' )
25+ sys .exit (- 1 )
26+ if opt .weights != 'model' :
27+ print ('--weights argument has been deprecated. Please configure /configs/models.yaml, and call it using --model instead.' )
28+ sys .exit (- 1 )
29+
3930 try :
4031 models = OmegaConf .load ('configs/models.yaml' )
4132 width = models [opt .model ].width
@@ -44,6 +35,7 @@ def main():
4435 weights = models [opt .model ].weights
4536 except (FileNotFoundError , IOError , KeyError ) as e :
4637 print (f'{ e } . Aborting.' )
38+ sys .exit (- 1 )
4739
4840 print ('* Initializing, be patient...\n ' )
4941 sys .path .append ('.' )
@@ -555,4 +547,4 @@ def create_cmd_parser():
555547
556548
557549if __name__ == '__main__' :
558- main ()
550+ main ()
0 commit comments