toriato / stable-diffusion-webui-wd14-tagger

Labeling extension for Automatic1111's Web UI
1.34k stars 235 forks source link

Does not preserve UTF-8 encoding of existing caption if loaded #63

Open space-nuko opened 1 year ago

space-nuko commented 1 year ago

When using append or similar, if the caption file is in UTF-8 the existing caption will be mangled as ASCII or something.

This line needs to specify UTF-8 as the encoding in read_text():

https://github.com/toriato/stable-diffusion-webui-wd14-tagger/blob/590c9a73fbb7db0f312d99a4f2b464328a7f569d/tagger/ui.py#L157