diff --git a/docker-entrypoint.py b/docker-entrypoint.py index 4f95391..ec289c9 100755 --- a/docker-entrypoint.py +++ b/docker-entrypoint.py @@ -150,7 +150,7 @@ def stable_diffusion_inference(p): print("completed pipeline:", iso_date_time(), flush=True) -def main(): +def parse_args(): parser = argparse.ArgumentParser(description="Create images from a text prompt.") parser.add_argument( "--attention-slicing", @@ -289,6 +289,10 @@ def main(): if args.prompt0 is not None: args.prompt = args.prompt0 + return args + +def main(): + args = parse_args() pipeline = stable_diffusion_pipeline(args) stable_diffusion_inference(pipeline)