AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.61k stars 26.76k forks source link

[Bug]: UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 2495 #14635

Closed iaami closed 9 months ago

iaami commented 9 months ago

Checklist

What happened?

After launching webui-user, i receive "UnicodeDecodeError" in the terminal

Steps to reproduce the problem

I don't know how to...

What should have happened?

Webui should launch

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

--dump-sysinfo.txt

Console logs

error: Your local changes to the following files would be overwritten by merge:
        modules/postprocessing.py
Please commit your changes or stash them before you merge.
Aborting
Updating c9c8485b..cf2772fa
venv "C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.5.2
Commit hash: c9c8485bc1e8720aba70f029d25cba1c4abf2b5c

Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
2024-01-12 17:38:30,283 - ControlNet - INFO - ControlNet v1.1.422
ControlNet preprocessor location: C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\extensions\sd-webui-controlnet\annotator\downloads
2024-01-12 17:38:30,353 - ControlNet - INFO - ControlNet v1.1.422
Loading weights [fd9cdc26c3] from C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\models\Stable-diffusion\dynavisionXLAllInOneStylized_release0557Bakedvae.safetensors
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\launch.py:39 in <module>                       │
│                                                                                                  │
│   36                                                                                             │
│   37                                                                                             │
│   38 if __name__ == "__main__":                                                                  │
│ ❱ 39 │   main()                                                                                  │
│   40                                                                                             │
│                                                                                                  │
│ C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\launch.py:35 in main                           │
│                                                                                                  │
│   32 │   if args.test_server:                                                                    │
│   33 │   │   configure_for_tests()                                                               │
│   34 │                                                                                           │
│ ❱ 35 │   start()                                                                                 │
│   36                                                                                             │
│   37                                                                                             │
│   38 if __name__ == "__main__":                                                                  │
│                                                                                                  │
│ C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\modules\launch_utils.py:394 in start           │
│                                                                                                  │
│   391 │   if '--nowebui' in sys.argv:                                                            │
│   392 │   │   webui.api_only()                                                                   │
│   393 │   else:                                                                                  │
│ ❱ 394 │   │   webui.webui()                                                                      │
│   395                                                                                            │
│                                                                                                  │
│ C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\webui.py:393 in webui                          │
│                                                                                                  │
│   390 │   │   modules.script_callbacks.before_ui_callback()                                      │
│   391 │   │   startup_timer.record("scripts before_ui_callback")                                 │
│   392 │   │                                                                                      │
│ ❱ 393 │   │   shared.demo = modules.ui.create_ui()                                               │
│   394 │   │   startup_timer.record("create ui")                                                  │
│   395 │   │                                                                                      │
│   396 │   │   if not cmd_opts.no_gradio_queue:                                                   │
│                                                                                                  │
│ C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\modules\ui.py:419 in create_ui                 │
│                                                                                                  │
│    416 │   parameters_copypaste.reset()                                                          │
│    417 │                                                                                         │
│    418 │   modules.scripts.scripts_current = modules.scripts.scripts_txt2img                     │
│ ❱  419 │   modules.scripts.scripts_txt2img.initialize_scripts(is_img2img=False)                  │
│    420 │                                                                                         │
│    421 │   with gr.Blocks(analytics_enabled=False) as txt2img_interface:                         │
│    422 │   │   txt2img_prompt, txt2img_prompt_styles, txt2img_negative_prompt, submit, _, _, tx  │
│                                                                                                  │
│ C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\modules\scripts.py:366 in initialize_scripts   │
│                                                                                                  │
│   363 │   │   auto_processing_scripts = scripts_auto_postprocessing.create_auto_preprocessing_   │
│   364 │   │                                                                                      │
│   365 │   │   for script_data in auto_processing_scripts + scripts_data:                         │
│ ❱ 366 │   │   │   script = script_data.script_class()                                            │
│   367 │   │   │   script.filename = script_data.path                                             │
│   368 │   │   │   script.is_txt2img = not is_img2img                                             │
│   369 │   │   │   script.is_img2img = is_img2img                                                 │
│                                                                                                  │
│ C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\extensions\Config-Presets\scripts\config_prese │
│ ts.py:735 in __init__                                                                            │
│                                                                                                  │
│    732 │   │   super().__init__(*args, **kwargs)                                                 │
│    733 │   │                                                                                     │
│    734 │   │   # Load custom tracked components                                                  │
│ ❱  735 │   │   txt2img_custom_tracked_components_ids = load_txt2img_custom_tracked_component_id  │
│    736 │   │   img2img_custom_tracked_components_ids = load_img2img_custom_tracked_component_id  │
│    737                                                                                           │
│    738                                                                                           │
│                                                                                                  │
│ C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\extensions\Config-Presets\scripts\config_prese │
│ ts.py:23 in load_txt2img_custom_tracked_component_ids                                            │
│                                                                                                  │
│     20 │   txt2img_custom_tracked_components_ids = []                                            │
│     21 │   try:                                                                                  │
│     22 │   │   with open(f"{BASEDIR}/{CONFIG_TXT2IMG_CUSTOM_TRACKED_COMPONENTS_FILE_NAME}", "r"  │
│ ❱   23 │   │   │   for line in file:                                                             │
│     24 │   │   │   │   line = line.strip()                                                       │
│     25 │   │   │   │   if not line.startswith("#") and line != "":  # ignore lines that start w  │
│     26 │   │   │   │   │   txt2img_custom_tracked_components_ids.append(line)                    │
│                                                                                                  │
│ C:\Users\slarr\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py:23 in decode      │
│                                                                                                  │
│    20                                                                                            │
│    21 class IncrementalDecoder(codecs.IncrementalDecoder):                                       │
│    22 │   def decode(self, input, final=False):                                                  │
│ ❱  23 │   │   return codecs.charmap_decode(input,self.errors,decoding_table)[0]                  │
│    24                                                                                            │
│    25 class StreamWriter(Codec,codecs.StreamWriter):                                             │
│    26 │   pass                                                                                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 2495: character maps to <undefined>
Creating model from config: C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\repositories\generative-models\configs\inference\sd_xl_base.yaml
Applying attention optimization: Doggettx... done.
Model loaded in 5.8s (load weights from disk: 0.8s, create model: 0.5s, apply weights to model: 1.3s, apply half(): 1.5s, move model to device: 1.5s, calculate empty prompt: 0.3s).

Additional information

Error shown up after i mooved my computer to an other house.

w-e-w commented 9 months ago

this issue is caused by Config-Presets extension, report the issues them

iaami commented 9 months ago

Okay thx a lot, what's "Config-Presets extension" ? is it in Windows ? In A111 ? Do you know how can i unable it ? Thanks for your precious help.

w-e-w commented 9 months ago

what's "Config-Presets extension"

seriously did you read your error logs???????

image

I'm guessing for whatever reason the file is trying to read is corrupted, and the extension failes to handle file corruption issue

iaami commented 9 months ago

i' a beginer, i don't know how to read this and fix it... So i guess i simply suprees this extension ? Thx for your help

w-e-w commented 9 months ago

well the easiest thing to do now is to just get rid of the extension and see if the issues go away go into your extensions directory and delete it (or move extension out if you wish to try and restore later)

iaami commented 9 months ago

thanks to you I can now generate pictures. There's still an issue with xformers and the public link that i can't understand.

Launching Web UI with arguments: No module 'xformers'. Proceeding without it. 2024-01-14 15:28:27,076 - ControlNet - INFO - ControlNet v1.1.422 ControlNet preprocessor location: C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\extensions\sd-webui-controlnet\annotator\downloads 2024-01-14 15:28:27,175 - ControlNet - INFO - ControlNet v1.1.422 Loading weights [fd9cdc26c3] from C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\models\Stable-diffusion\dynavisionXLAllInOneStylized_release0557Bakedvae.safetensors [VRAMEstimator] No stats available, run benchmark first Deforum ControlNet support: enabled Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). Startup time: 19.0s (launcher: 4.9s, import torch: 7.7s, import gradio: 0.9s, setup paths: 1.0s, other imports: 1.5s, list SD models: 0.2s, load scripts: 1.4s, create ui: 0.9s, gradio launch: 0.4s). Creating model from config: C:\Users\slarr\Desktop\AI\stable-diffusion-webui3\repositories\generative-models\configs\inference\sd_xl_base.yaml Applying attention optimization: Doggettx... done. Model loaded in 9.5s (load weights from disk: 1.6s, create model: 0.5s, apply weights to model: 4.0s, apply half(): 1.4s, move model to device: 1.6s, calculate empty prompt: 0.3s).