write sample prompts as utf8 to avoid bug with funny characters

This commit is contained in:
Victor Hall 2023-01-09 17:21:44 -05:00
parent 99d8c6bc32
commit 97a8c69451
1 changed files with 1 additions and 1 deletions

View File

@ -406,7 +406,7 @@ def main(args):
clean_prompt = clean_filename(prompt)
result.save(f"{log_folder}/samples/gs{gs:05}-{clean_prompt[:100]}.jpg", format="JPEG", quality=95, optimize=True, progressive=False)
with open(f"{log_folder}/samples/gs{gs:05}-{clean_prompt[:100]}.txt", "w") as f:
with open(f"{log_folder}/samples/gs{gs:05}-{clean_prompt[:100]}.txt", "w", encoding='utf-8') as f:
f.write(prompt)
f.write(f"\n seed: {seed}")