stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]:interrogate deepbooru error

Open Futabaka opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

I try the command set COMMANDLINE_ARGS=--deepdanbooru


- `venv "D:\ai\stable-diffusion-webui-master\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)]
- Commit hash: <none>
- Installing requirements for Web UI
- Installing requirements for scikit_learn
- 
- Launching Web UI with arguments: --xformers --deepdanbooru --autolaunch
- Dreambooth API layer loaded
- Installing pywin32
- LatentDiffusion: Running in eps-prediction mode
- DiffusionWrapper has 859.52 M params.
- Loading weights [c3841625] from D:\ai\stable-diffusion-webui-master\models\Stable-diffusion\model.ckpt
- Using VAE found similar to selected model: D:\ai\stable-diffusion-webui-master\models\Stable-diffusion\model.vae.pt
- Loading VAE weights from: D:\ai\stable-diffusion-webui-master\models\Stable-diffusion\model.vae.pt
- Applying xformers cross attention optimization.
- Model loaded.
- Loaded a total of 1 textual inversion embeddings.
- Embeddings: .pt
- Running on local URL:  http://127.0.0.1:7860`

Steps to reproduce the problem

  1. Steps to reproduce the problem
  2. Go to img2img
  3. Press interrogate deepbooru
  4. ...ERROR

What should have happened?

need help ;-;

Commit where the problem happens

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

set COMMANDLINE_ARGS=--deepdanbooru

Additional information, context and logs

Error verifying pickled file from D:\ai\stable-diffusion-webui-master\models\torch_deepdanbooru\model-resnet_custom_v3.pt:
Traceback (most recent call last):
  File "D:\ai\stable-diffusion-webui-master\extensions\sd_dreambooth_extension\reallysafe.py", line 88, in check_pt
    with zipfile.ZipFile(filename) as z:
  File "C:\Users\TEL\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1267, in __init__
    self._RealGetContents()
  File "C:\Users\TEL\AppData\Local\Programs\Python\Python310\lib\zipfile.py", line 1334, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\ai\stable-diffusion-webui-master\extensions\sd_dreambooth_extension\reallysafe.py", line 142, in load_with_extra
    check_pt(filename, extra_handler)
  File "D:\ai\stable-diffusion-webui-master\extensions\sd_dreambooth_extension\reallysafe.py", line 109, in check_pt
    unpickler.load()
_pickle.UnpicklingError: persistent IDs in protocol 0 must be ASCII strings

-----> !!!! The file is most likely corrupted !!!! <-----
You can skip this check with --disable-safe-unpickle commandline argument, but that is not going to help you.


Traceback (most recent call last):
  File "D:\ai\stable-diffusion-webui-master\venv\lib\site-packages\gradio\routes.py", line 284, in run_predict
    output = await app.blocks.process_api(
  File "D:\ai\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 982, in process_api
    result = await self.call_function(fn_index, inputs, iterator)
  File "D:\ai\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 824, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "D:\ai\stable-diffusion-webui-master\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "D:\ai\stable-diffusion-webui-master\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "D:\ai\stable-diffusion-webui-master\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "D:\ai\stable-diffusion-webui-master\modules\ui.py", line 275, in interrogate_deepbooru
    prompt = deepbooru.model.tag(image)
  File "D:\ai\stable-diffusion-webui-master\modules\deepbooru.py", line 44, in tag
    self.start()
  File "D:\ai\stable-diffusion-webui-master\modules\deepbooru.py", line 35, in start
    self.load()
  File "D:\ai\stable-diffusion-webui-master\modules\deepbooru.py", line 29, in load
    self.model.load_state_dict(torch.load(files[0], map_location="cpu"))
  File "D:\ai\stable-diffusion-webui-master\modules\deepbooru_model.py", line 673, in load_state_dict
    self.tags = state_dict.get('tags', [])
AttributeError: 'NoneType' object has no attribute 'get'

Futabaka avatar Dec 11 '22 15:12 Futabaka

same here

dantecsm avatar Dec 11 '22 17:12 dantecsm

What's the size of your D:\ai\stable-diffusion-webui-master\models\torch_deepdanbooru\model-resnet_custom_v3.pt file?

It should be 629,048 KB.

wywywywy avatar Dec 12 '22 09:12 wywywywy

Delete the file, it should re-download automatically again.

If that doesn't work, then download manually from here https://github.com/AUTOMATIC1111/TorchDeepDanbooru/releases/download/v1/model-resnet_custom_v3.pt

wywywywy avatar Dec 12 '22 11:12 wywywywy

same error here,and fix it,thanks

PangHao-NEFU avatar May 31 '23 08:05 PangHao-NEFU