AUTOMATIC1111 / stable-diffusion-webui

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

Error Interrogating #479

Closed wavymulder closed 2 years ago

wavymulder commented 2 years ago

Interrogate feature is seemingly not pulling information from my additional text files (flavors, movements, etc) and is giving the following when pressing the Interrogate button:

load checkpoint from https://storage.googleapis.com/sfr-vision-language-research/BLIP/models/model_base_caption_capfilt_large.pth Error interrogating Traceback (most recent call last): File "C:\Automatic-StableD\stable-diffusion-webui\modules\interrogate.py", line 156, in interrogate matches = self.rank(image_features, items, top_count=topn) File "C:\Automatic-StableD\stable-diffusion-webui\modules\interrogate.py", line 101, in rank text_tokens = clip.tokenize([text for text in text_array]).to(shared.device) File "C:\Automatic-StableD\stable-diffusion-webui\venv\lib\site-packages\clip\clip.py", line 234, in tokenize raise RuntimeError(f"Input {texts[i]} is too long for context length {context_length}") RuntimeError: Input <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-5178aee0ee76.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-217d4f9c8e70.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-0adfa28f0e68.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-1c8575b36644.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-5113d2be20b0.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-c96add742484.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-290f92f5e867.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-cdd88f146bf7.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-2171ea0f078b.css" /> is too long for context length 77

The results in the UI feature a description followed by <error>, EXAMPLE:

a woman with her eyes closed and her hand resting on her shoulder,, against a gray background of a white wall<error>

I have redownloaded the model_base_caption_capfilt_large.pth file twice now to check it was corrupted.

Thank you.

AUTOMATIC1111 commented 2 years ago

this is happening because you put this long html/css line into one of text files used for interrogation.

wavymulder commented 2 years ago

I'm sure you don't need to be told, but you're right :)

Thanks for your help. Sorry for not checking those text files before opening an issue.

In case this description of the problem helps a future user using the search tool: I was tired and very stupidly saved the additional .txt files as firefox .txt, which had all the html garbage. Silly mistake lol