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

[Bug]: module 'clip' has no attribute 'load'

Open tonyy01 opened this issue 1 year ago • 0 comments

Is there an existing issue for this?

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

What happened?

I just did the following steps and it produce the following error.

Steps to reproduce the problem

  1. Run web-user.bat
  2. Click img2img
  3. Upload an Image
  4. Click Interrogate CLIP

What should have happened?

Prompts should be generated

Commit where the problem happens

python: 3.10.9  •  torch: 1.13.1+cu117  •  xformers: 0.0.16rc425  •  gradio: 3.16.2  •  commit: 0cc0ee1b  •  checkpoint: fc2511737a

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No

List of extensions

No

Console logs

Creating model from config: D:\Documents\AI Painting\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(0):
Model loaded in 32.8s (load weights from disk: 0.2s, create model: 0.7s, apply weights to model: 19.2s, apply half(): 8.2s, move model to device: 1.8s, hijack: 0.1s, load textual inversion embeddings: 2.5s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
load checkpoint from D:\Documents\AI Painting\stable-diffusion-webui\models\BLIP\model_base_caption_capfilt_large.pth
Error interrogating
Traceback (most recent call last):
  File "D:\Documents\AI Painting\stable-diffusion-webui\modules\interrogate.py", line 196, in interrogate
    self.load()
  File "D:\Documents\AI Painting\stable-diffusion-webui\modules\interrogate.py", line 130, in load
    self.clip_model, self.clip_preprocess = self.load_clip_model()
  File "D:\Documents\AI Painting\stable-diffusion-webui\modules\interrogate.py", line 114, in load_clip_model
    model, preprocess = clip.load(clip_model_name, download_root=shared.cmd_opts.clip_models_path)
AttributeError: module 'clip' has no attribute 'load'

Additional information

It seems like there is not a attribute called 'load' in the 'clip' module. In fact, I downloaded the package myself due to the bad network connection, and I don't know where it is located and where it should be located. Could anyone, at least, tell me where the it is located? Thank you in advance for your assistance!

tonyy01 avatar Mar 16 '23 01:03 tonyy01