Skip to content

Fix the expected name of the from_file argument in txt2img#334

Open
freespirit wants to merge 1 commit intoCompVis:mainfrom
freespirit:txt2image_from_file
Open

Fix the expected name of the from_file argument in txt2img#334
freespirit wants to merge 1 commit intoCompVis:mainfrom
freespirit:txt2image_from_file

Conversation

@freespirit
Copy link
Copy Markdown

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.

The argument parser expects an argument with the name from-file
but the code looks for from_file. This issue doesn't break the code
but may be confusing for users of the script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant