Skip to content

Commit

Permalink
fix: ensure booleans do not consume other args
Browse files Browse the repository at this point in the history
  • Loading branch information
fboulnois committed Feb 25, 2023
1 parent 2185ec5 commit 4f67299
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions docker-entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,7 @@ def main():
parser = argparse.ArgumentParser(description="Create images from a text prompt.")
parser.add_argument(
"--attention-slicing",
type=bool,
nargs="?",
const=True,
default=False,
action='store_true',
help="Use less memory at the expense of inference speed",
)
parser.add_argument(
Expand All @@ -160,10 +157,7 @@ def main():
)
parser.add_argument(
"--half",
type=bool,
nargs="?",
const=True,
default=False,
action='store_true',
help="Use float16 (half-sized) tensors instead of float32",
)
parser.add_argument(
Expand Down Expand Up @@ -209,10 +203,7 @@ def main():
)
parser.add_argument(
"--onnx",
type=bool,
nargs="?",
const=True,
default=False,
action='store_true',
help="Use the onnx runtime for inference",
)
parser.add_argument(
Expand Down Expand Up @@ -243,10 +234,7 @@ def main():
)
parser.add_argument(
"--skip",
type=bool,
nargs="?",
const=True,
default=False,
action='store_true',
help="Skip the safety checker",
)
parser.add_argument(
Expand All @@ -266,10 +254,7 @@ def main():
)
parser.add_argument(
"--xformers-memory-efficient-attention",
type=bool,
nargs="?",
const=True,
default=False,
action='store_true',
help="Use less memory but require the xformers library",
)
parser.add_argument(
Expand Down

0 comments on commit 4f67299

Please sign in to comment.