Open djkacevedo opened 1 year ago
what OS? have you edited the artists.txt file?
Windows 11, and nope. Just downloaded the files you linked, I tried with all at once, and one at a time, and the same error.
Windows 11, and nope. Just downloaded the files you linked, I tried with all at once, and one at a time, and the same error.
did you download files from here ?
https://github.com/pharmapsychotic/clip-interrogator/tree/main/data
downloaded ? git clone ? or copy-paste?
I cloned clip-interrogator, and then picked the files from clip-interrogator\data with the "click here to upload" button.
I cloned,picked files, and run the script.But I haven't encountered such problems as yours. I don't know how to reproduce this mistake.Maybe you can try updating webui?
Windows 11, and nope. Just downloaded the files you linked, I tried with all at once, and one at a time, and the same error.
I`ve got the same error here, also on Windows 11. I've tried to clone the repository and use the files without any edit, then I tried to download the raw content of the files and got the same error. Also tried to re-save the files, forcing the UTF-8 encoding, with VSCode. Here is the log:
artists
Error completing request
Arguments: ('', '', 'None', 'None', 20, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 0, 0, 4, 0.9, 5, '0.0001', False, 'None', '', 0.1, False, False, False, None, '', 1, '', 0, '', True, False, False, 4.0, 1.0, 'a painting in', 'style', 'picture frame, portrait photo', [<tempfile._TemporaryFileWrapper object at 0x00000228332C2170>, <tempfile._TemporaryFileWrapper object at 0x00000228332C3280>, <tempfile._TemporaryFileWrapper object at 0x00000228332C2F50>, <tempfile._TemporaryFileWrapper object at 0x00000228332C2E00>]) {}
Traceback (most recent call last):
File "C:\stable-diffusion-automatic1111\modules\ui.py", line 221, in f
res = list(func(*args, **kwargs))
File "C:\stable-diffusion-automatic1111\webui.py", line 63, in f
res = func(*args, **kwargs)
File "C:\stable-diffusion-automatic1111\modules\txt2img.py", line 45, in txt2img
processed = modules.scripts.scripts_txt2img.run(p, *args)
File "C:\stable-diffusion-automatic1111\modules\scripts.py", line 286, in run
processed = script.run(p, *script_args)
File "C:\stable-diffusion-automatic1111\extensions\inspiration\scripts\inspiration.py", line 45, in run
line = f.readline()
File "C:\Program Files\Python310\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5196: character maps to <undefined>
I was able to solve by using UTF-8 when reading the file, made this PR: https://github.com/yfszzx/stable-diffusion-webui-inspiration/pull/7
I have still this error. Can you explain more how you fix it? I don't understand... :(
Edit: i used the same method from wbecher to resolve the problem
modify inspiration.py
Line 73:
f = open(file, "r")
f = open(file, "r", encoding='utf-8')
Line 89
with open(file, "a") as f:
with open(file, "a", encoding='utf-8') as f:
Edit2: need to change line 173 too...
To solve a similar problem, I used this for the list of artists:
When I run the create inspiration images script with the artists.txt file, I get this: