AUTOMATIC1111/stable-diffusion-webui-wildcards

Request: add utf-8 support

Gh20221205 opened this issue · 1 comments

I got following error when trying to use a list of names from this link (https://civitai.com/models/70708?modelVersionId=79565) and saved in a txt file in wildcards folder.
Error running process: D:\stable-diffusion\stable-diffusion-webui\extensions\stable-diffusion-webui-wildcards\scripts\wildcards.pys] Traceback (most recent call last): File "D:\stable-diffusion\stable-diffusion-webui\modules\scripts.py", line 418, in process script.process(p, *script_args) File "D:\stable-diffusion\stable-diffusion-webui\extensions\stable-diffusion-webui-wildcards\scripts\wildcards.py", line 41, in process prompt = "".join(self.replace_wildcard(chunk, gen) for chunk in prompt.split("__")) File "D:\stable-diffusion\stable-diffusion-webui\extensions\stable-diffusion-webui-wildcards\scripts\wildcards.py", line 41, in <genexpr> prompt = "".join(self.replace_wildcard(chunk, gen) for chunk in prompt.split("__")) File "D:\stable-diffusion\stable-diffusion-webui\extensions\stable-diffusion-webui-wildcards\scripts\wildcards.py", line 25, in replace_wildcard return gen.choice(f.read().splitlines()) File "C:\Users\Meng Lu\AppData\Local\Programs\Python\Python310\lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 221: invalid continuation byte

Nevermind, I think I figured it out. The txt file has to be saved properly.