openvinotoolkit / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
247 stars 39 forks source link

[Bug]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) #73

Open aoke79 opened 7 months ago

aoke79 commented 7 months ago

Is there an existing issue for this?

What happened?

when I downloaded the latet code this morning, and run the first_time_runner.bat to update the libary, and then run webui-user.bat to run it. it can create a web link successfully, and I wrote a simple prompt to drive it, it shows below errors, which has been a long time.

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Steps to reproduce the problem

  1. run webui-user.bat
  2. write a simple prompt in web page, click "generate"
  3. check the command line windows.
  4. you will see the errors

What should have happened?

generate a image successfully.

Sysinfo

CPU: 12700H GPU: A730M OS: win11

What browsers do you use to access the UI ?

Google Chrome

Console logs

Microsoft Windows [版本 10.0.22621.2428]
(c) Microsoft Corporation。保留所有权利。

C:\lin\AIGC\github\sd_ov_develop>webui-user.bat
venv "C:\lin\AIGC\github\sd_ov_develop\venv\Scripts\Python.exe"
fatal: No names found, cannot describe anything.
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: 1.6.0
Commit hash: d172a08db469c4db97d6cccf1c608ee0ef7a58ee
Launching Web UI with arguments: --skip-torch-cuda-test --precision full --no-half
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
Loading weights [e6bb9ea85b] from C:\lin\AIGC\github\sd_ov_develop\models\Stable-diffusion\sd_xl_base_1.0_0.9vae.safetensors
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Creating model from config: C:\lin\AIGC\github\sd_ov_develop\repositories\generative-models\configs\inference\sd_xl_base.yaml
Startup time: 6.2s (prepare environment: 0.2s, import torch: 2.1s, import gradio: 0.6s, setup paths: 0.5s, other imports: 0.4s, setup codeformer: 0.1s, load scripts: 0.7s, create ui: 0.7s, gradio launch: 0.8s).
Applying attention optimization: InvokeAI... done.
Model loaded in 6.2s (load weights from disk: 1.4s, create model: 0.4s, apply weights to model: 2.8s, apply float(): 1.1s, calculate empty prompt: 0.4s).
{}
Loading weights [e6bb9ea85b] from C:\lin\AIGC\github\sd_ov_develop\models\Stable-diffusion\sd_xl_base_1.0_0.9vae.safetensors
OpenVINO Script:  created model from config : C:\lin\AIGC\github\sd_ov_develop\repositories\generative-models\configs\inference\sd_xl_base.yaml
*** Error completing request
*** Arguments: ('task(r0fwv6dmeb2xxun)', 'a dog', 'ugly', [], 20, 'Euler a', 1, 1, 7, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], <gradio.routes.Request object at 0x0000025689FCDB70>, 1, False, '', 0.8, -1, False, -1, 0, 0, 0, 'None', 'sdxl_vae.safetensors', 'GPU.1', True, 'Euler a', True, True, 'None', 0.8, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False) {}
    Traceback (most recent call last):
      File "C:\lin\AIGC\github\sd_ov_develop\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "C:\lin\AIGC\github\sd_ov_develop\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "C:\lin\AIGC\github\sd_ov_develop\modules\txt2img.py", line 52, in txt2img
        processed = modules.scripts.scripts_txt2img.run(p, *args)
      File "C:\lin\AIGC\github\sd_ov_develop\modules\scripts.py", line 601, in run
        processed = script.run(p, *script_args)
      File "C:\lin\AIGC\github\sd_ov_develop\scripts\openvino_accelerate.py", line 1213, in run
        processed = process_images_openvino(p, model_config, vae_ckpt, p.sampler_name, enable_caching, openvino_device, mode, is_xl_ckpt, refiner_ckpt, refiner_frac)
      File "C:\lin\AIGC\github\sd_ov_develop\scripts\openvino_accelerate.py", line 880, in process_images_openvino
        shared.sd_diffusers_model = get_diffusers_sd_model(model_config, vae_ckpt, sampler_name, enable_caching, openvino_device, mode, is_xl_ckpt, refiner_ckpt, refiner_frac)
      File "C:\lin\AIGC\github\sd_ov_develop\scripts\openvino_accelerate.py", line 541, in get_diffusers_sd_model
        sd_model = StableDiffusionXLPipeline.from_single_file(checkpoint_path, original_config_file=checkpoint_config, use_safetensors=True, add_watermark=False, variant="fp32", dtype=torch.float32)
      File "C:\lin\AIGC\github\sd_ov_develop\venv\lib\site-packages\diffusers\loaders.py", line 2201, in from_single_file
        pipe = download_from_original_stable_diffusion_ckpt(
      File "C:\lin\AIGC\github\sd_ov_develop\venv\lib\site-packages\diffusers\pipelines\stable_diffusion\convert_from_ckpt.py", line 1599, in download_from_original_stable_diffusion_ckpt
        tokenizer_2 = CLIPTokenizer.from_pretrained(
      File "C:\lin\AIGC\github\sd_ov_develop\venv\lib\site-packages\transformers\tokenization_utils_base.py", line 1825, in from_pretrained
        return cls._from_pretrained(
      File "C:\lin\AIGC\github\sd_ov_develop\venv\lib\site-packages\transformers\tokenization_utils_base.py", line 2022, in _from_pretrained
        added_tok_encoder = json.load(added_tokens_handle)
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\json\__init__.py", line 293, in load
        return loads(fp.read(),
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\json\__init__.py", line 346, in loads
        return _default_decoder.decode(s)
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 337, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 355, in raw_decode
        raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

---

Additional information

No response