Merge branch 'development' into development

This commit is contained in:
Peter Baylies 2022-09-06 08:08:43 -04:00 committed by GitHub
commit 7647490617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -232,7 +232,12 @@ def main():
print(f"reading prompts from {opt.from_file}")
with open(opt.from_file, "r") as f:
data = f.read().splitlines()
if (len(data) >= batch_size):
data = list(chunk(data, batch_size))
else:
while (len(data) < batch_size):
data.append(data[-1])
data = [data]
sample_path = os.path.join(outpath, "samples")
os.makedirs(sample_path, exist_ok=True)