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

Fix the expected name of the from_file argument in txt2img

Open freespirit opened this issue 3 years ago • 0 comments

The argument parser expects an argument with the name from-file but the code looks for from_file. This issue doesn't crash the code but may be confusing for users of the script - it would cause strange behaviour.

In more details:

parser.add_argument(
    "--from-file",

And later in the code:

if not opt.from_file:
...

Note that the ArgumentParser looks flexible enough to accept unknown arguments but if someone reads the code and tries to enter from-file they may have troubles down the road when opt.from_file is not found and prompts won't be loaded from a file.

freespirit avatar Sep 29 '22 09:09 freespirit