write sample prompts as utf8 to avoid bug with funny characters
This commit is contained in:
parent
99d8c6bc32
commit
97a8c69451
2
train.py
2
train.py
|
@ -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}")
|
||||
|
||||
|
|
Loading…
Reference in New Issue