From 941b9f9e977f7bc63005cd07c2246f91fb4107a7 Mon Sep 17 00:00:00 2001 From: Mohan-Zhang-u Date: Sun, 27 Nov 2022 03:16:49 -0500 Subject: [PATCH] remove wrong arguments while using from_file. --- scripts/txt2img.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/scripts/txt2img.py b/scripts/txt2img.py index 1ed42a3..7537d8c 100644 --- a/scripts/txt2img.py +++ b/scripts/txt2img.py @@ -165,12 +165,6 @@ def parse_args(): choices=["full", "autocast"], default="autocast" ) - parser.add_argument( - "--repeat", - type=int, - default=1, - help="repeat each prompt in file this often", - ) opt = parser.parse_args() return opt @@ -218,7 +212,7 @@ def main(opt): print(f"reading prompts from {opt.from_file}") with open(opt.from_file, "r") as f: data = f.read().splitlines() - data = [p for p in data for i in range(opt.repeat)] + data = [p for p in data for i in range(batch_size)] data = list(chunk(data, batch_size)) sample_path = os.path.join(outpath, "samples")