0xbitches / sd-webui-lcm

Latent Consistency Model for AUTOMATIC1111 Stable Diffusion WebUI
MIT License
614 stars 43 forks source link

Unicode Encode Error #17

Closed teftef6220 closed 9 months ago

teftef6220 commented 9 months ago

UnicodeDecodeError: 'cp932' codec can't decode byte 0x97 in position 12023: illegal multibyte sequence

An error like this will occur. I can solve the problem by rewriting the code a little, so can I send a pull request?

0xbitches commented 9 months ago

I have not seen this error before. Can you describe when this occurs? In the meantime, feel free to submit a PR

teftef6220 commented 9 months ago

When starting the WebUI in line 129

    with gr.Blocks(css="style.css") as lcm:

When I try to read css in

*** Error executing callback ui_tabs_callback for E:\stable-diffusion-webui\extensions\sd-webui-lcm\scripts\main.py
    Traceback (most recent call last):
      File "E:\stable-diffusion-webui\modules\script_callbacks.py", line 166, in ui_tabs_callback
        res += c.callback() or []
      File "E:\stable-diffusion-webui\extensions\sd-webui-lcm\scripts\main.py", line 129, in on_ui_tabs
        with gr.Blocks(css="style.css") as lcm:
      File "E:\stable-diffusion-webui\venv\lib\site-packages\gradio\blocks.py", line 711, in __init__
        self.css = css_file.read()
    UnicodeDecodeError: 'cp932' codec can't decode byte 0x97 in position 12023: illegal multibyte sequence

I get an error like this.

0xbitches commented 9 months ago

Closing as this should be fixed in https://github.com/0xbitches/sd-webui-lcm/commit/40b6bf219eb80bb796ef3974bc710894b63815ea