Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: BLIP Captioning error #14333

Closed
4 of 6 tasks
Ninkurk opened this issue Dec 16, 2023 · 9 comments
Closed
4 of 6 tasks

[Bug]: BLIP Captioning error #14333

Ninkurk opened this issue Dec 16, 2023 · 9 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@Ninkurk
Copy link

Ninkurk commented Dec 16, 2023

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

BLIP captioning is not working. Deepbooru is working just fine.

Steps to reproduce the problem

Go to extras
use the following settings(both folder addresses are correct)
image

This error will appear: AttributeError: 'str' object has no attribute 'to'

What should have happened?

I should have gotten the captioned images

What browsers do you use to access the UI ?

Brave

Sysinfo

sysinfo-2023-12-16-16-20.json

Console logs

Style database not found: /workspace/sd/stable-diffusion-webui/styles.csv
ControlNet preprocessor location: /workspace/sd/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
2023-12-16 16:18:06,305 - ControlNet - INFO - ControlNet v1.1.423
2023-12-16 16:18:06,394 - ControlNet - INFO - ControlNet v1.1.423
Loading weights [e6d27cb445] from /workspace/sd/stable-diffusion-webui/models/Stable-diffusion/modelUpdate.safetensors
Creating model from config: /workspace/sd/stable-diffusion-webui/configs/v1-inference.yaml
Applying attention optimization: sdp... done.
Model loaded in 2.4s (create model: 0.4s, apply weights to model: 1.3s, calculate empty prompt: 0.6s).
Running on local URL: https://5i5ijoq8wvjw1c-3001.proxy.runpod.net
✔ Connected
Startup time: 8.4s (import torch: 2.2s, import gradio: 0.8s, setup paths: 0.8s, other imports: 0.3s, load scripts: 0.9s, create ui: 3.0s, gradio launch: 0.1s).
*** Error completing request
*** Arguments: ('task(uggghbdnf18babe)', 2, None, None, '/workspace/un/out', '/workspace/un/cap', True, 0, 1, 512, 512, True, 'None', 'None', 0, False, 1, False, 1, 0, False, 0.9, 0.15, 0.5, False, False, 384, 768, 4096, 409600, 'Maximize area', 0.1, True, ['BLIP'], False, ['Horizontal'], False, 0.5, 0.2) {}
    Traceback (most recent call last):
      File "/workspace/sd/stable-diffusion-webui/modules/call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "/workspace/sd/stable-diffusion-webui/modules/call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "/workspace/sd/stable-diffusion-webui/modules/postprocessing.py", line 132, in run_postprocessing_webui
        return run_postprocessing(*args, **kwargs)
      File "/workspace/sd/stable-diffusion-webui/modules/postprocessing.py", line 73, in run_postprocessing
        scripts.scripts_postproc.run(initial_pp, args)
      File "/workspace/sd/stable-diffusion-webui/modules/scripts_postprocessing.py", line 196, in run
        script.process(single_image, **process_args)
      File "/workspace/sd/stable-diffusion-webui/scripts/postprocessing_caption.py", line 28, in process
        captions.append(shared.interrogator.generate_caption(pp.image))
      File "/workspace/sd/stable-diffusion-webui/modules/interrogate.py", line 178, in generate_caption
        ])(pil_image).unsqueeze(0).type(self.dtype).to(devices.device_interrogate)
    AttributeError: 'str' object has no attribute 'to'

---

Additional information

I am working on runpod

@Ninkurk Ninkurk added the bug-report Report of a bug, yet to be confirmed label Dec 16, 2023
@vantang
Copy link

vantang commented Dec 17, 2023

same issue

@AlexanderProd
Copy link

AlexanderProd commented Dec 17, 2023

Same here on Chrome

Edit: has been fixed in the dev branch

@AbdelhamidLarachi
Copy link

same

@jaffster595
Copy link

Also having the same issue. I noticed this commit in dev branch:
3d9a0d9

So, either move to using the dev branch or amend 'scripts/postprocessing_caption.py':

Delete line 28: captions.append(shared.interrogator.generate_caption(pp.image))
Replace with: captions.append(shared.interrogator.interrogate(pp.image.convert("RGB")))

I've just done this and it's working for me now.

@w-e-w
Copy link
Collaborator

w-e-w commented Dec 19, 2023

duplicate of #14328
and fix #14330

@w-e-w w-e-w closed this as completed Dec 19, 2023
@ptsdgit
Copy link

ptsdgit commented Mar 19, 2024

same issue
Currently, is there a solution to this issue??

@ZhangEnsure
Copy link

same issue Currently, is there a solution to this issue??

me too

@w-e-w
Copy link
Collaborator

w-e-w commented Mar 28, 2024

duplicate of #14328
and fix #14330

just update
as I have said above
this is a duplicate and the fix has been merged

if you are expecting an issue after using the current master version
then open a new issue post

@ZhangEnsure
Copy link

duplicate of #14328
and fix #14330

just update as I have said above this is a duplicate and the fix has been merged

if you are expecting an issue after using the current master version then open a new issue post

Thank you my friend! I fellow the steps above and solved this problem yesterday, but I forgot to delete that replement,Sorry~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

8 participants