Closed teftef6220 closed 9 months ago
By the way, the webui loads any style.css
("style" without an extra "s") at the root of extension directories (source). I'm not totally sure but maybe we can use this to simplify the code?
The code in this extension reads style.css in
~/stable-diffusion-webui/extensions/sd-webui-lcm/scripts/
So I think the css needs to be independent of the style.css in
stable-diffusion-webui/
For example, I believe that style.css may be changed when webui is updated, which could cause an error.
Sorry, I don't clearly understand your comment and replied with this comment. I am sorry if I don't answer your question according to your intention.
I am confused because there is a file at scripts/styles.css
which does not match the name used in this PR (style.css
) so the intent is not so clear to me. IIUC the current code loads the css file located at the root of the webui (not this extension), however this file should already be loaded by the webui AFAIK... Am I getting this right?
I see! it's my mistake . thanks
I'm thinking about just removing scripts/styles.css
since it does not actually do much.
I understand. Shall we close this PR then?
ty
When starting the WebUI
When trying to read css
nicodeDecodeError: 'cp932' codec can't decode byte 0x97 in position 12023: illegal multibyte sequence
I get an error like this.
I created a function that reads a CSS file in scripts/main.py, encodes css in UTF-8, and used that function to pass the CSS content to gr.Blocks. It works on my enviroment