mirror of
https://github.com/pharmapsychotic/clip-interrogator-ext.git
synced 2026-11-05 01:27:20 +00:00
[GH-ISSUE #25] Extension not working since latest update #22
Labels
No labels
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pharmapsychotic/clip-interrogator-ext#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tarunabhdutta on GitHub (Mar 20, 2023).
Original GitHub issue: https://github.com/pharmapsychotic/clip-interrogator-ext/issues/25
Error verifying new BLIP Large pickled file. Can I download it manually to solve the issue?
HERE IS THE ERROR:
Loading CLIP Interrogator 0.6.0...
Loading caption model blip-large...
Error verifying pickled file from C:\Users\TD FILM STUDIO/.cache\huggingface\hub\models--Salesforce--blip-image-captioning-large\snapshots\44f04d56320e7d169fec18c4b19f7efb9ab83105\pytorch_model.bin:
Traceback (most recent call last):
File "C:\SD\stable-diffusion-webui-master\modules\safe.py", line 81, in check_pt
with zipfile.ZipFile(filename) as z:
File "C:\Program Files\Python310\lib\zipfile.py", line 1267, in init
self._RealGetContents()
File "C:\Program Files\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 "C:\SD\stable-diffusion-webui-master\modules\safe.py", line 135, in load_with_extra
check_pt(filename, extra_handler)
File "C:\SD\stable-diffusion-webui-master\modules\safe.py", line 102, 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 "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\SD\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 "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\SD\stable-diffusion-webui-master\extensions\clip-interrogator-ext\scripts\clip_interrogator_ext.py", line 128, in image_to_prompt
load(clip_model_name, caption_model_name)
File "C:\SD\stable-diffusion-webui-master\extensions\clip-interrogator-ext\scripts\clip_interrogator_ext.py", line 66, in load
ci = Interrogator(config)
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\clip_interrogator\clip_interrogator.py", line 70, in init
self.load_caption_model()
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\clip_interrogator\clip_interrogator.py", line 84, in load_caption_model
caption_model = BlipForConditionalGeneration.from_pretrained(model_path, torch_dtype=self.dtype)
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\transformers\modeling_utils.py", line 2480, in from_pretrained
loaded_state_dict_keys = list(state_dict.keys())
AttributeError: 'NoneType' object has no attribute 'keys'
@keenmouse commented on GitHub (Mar 20, 2023):
Is it failing to validate pytorch_model.bin because your virus scanner is removing it as soon as it's downloaded? I think you might be having the same problem being discussed here and here. It may only be happening with Windows Defender.
@tripletto commented on GitHub (Mar 20, 2023):
Can confirm, deactivating the Windows Defender real time protection made it work.
@tarunabhdutta commented on GitHub (Mar 21, 2023):
No, windows defender and firewall were already turned off. Moreover turning off all the firewall and all my antivirus did not help. I tried manually downloading the pytorch_model.bin for 'BLIP Large' and put it in the Clip Interrogator folder inside model folder of A1111. That didn't help either.
Loading CLIP Interrogator 0.6.0...
Loading caption model blip-large...
Error verifying pickled file from C:\Users\TD FILM STUDIO/.cache\huggingface\hub\models--Salesforce--blip-image-captioning-large\snapshots\44f04d56320e7d169fec18c4b19f7efb9ab83105\pytorch_model.bin:
Traceback (most recent call last):
File "C:\SD\stable-diffusion-webui-master\modules\safe.py", line 81, in check_pt
with zipfile.ZipFile(filename) as z:
File "C:\Program Files\Python310\lib\zipfile.py", line 1267, in init
self._RealGetContents()
File "C:\Program Files\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 "C:\SD\stable-diffusion-webui-master\modules\safe.py", line 135, in load_with_extra
check_pt(filename, extra_handler)
File "C:\SD\stable-diffusion-webui-master\modules\safe.py", line 102, 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 "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
output = await app.get_blocks().process_api(
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
result = await self.call_function(
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\SD\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 "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\anyio_backends_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\SD\stable-diffusion-webui-master\extensions\clip-interrogator-ext\scripts\clip_interrogator_ext.py", line 128, in image_to_prompt
load(clip_model_name, caption_model_name)
File "C:\SD\stable-diffusion-webui-master\extensions\clip-interrogator-ext\scripts\clip_interrogator_ext.py", line 66, in load
ci = Interrogator(config)
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\clip_interrogator\clip_interrogator.py", line 70, in init
self.load_caption_model()
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\clip_interrogator\clip_interrogator.py", line 84, in load_caption_model
caption_model = BlipForConditionalGeneration.from_pretrained(model_path, torch_dtype=self.dtype)
File "C:\SD\stable-diffusion-webui-master\venv\lib\site-packages\transformers\modeling_utils.py", line 2480, in from_pretrained
loaded_state_dict_keys = list(state_dict.keys())
AttributeError: 'NoneType' object has no attribute 'keys'
@tripletto commented on GitHub (Mar 21, 2023):
^^
From your error message. I had this as well and can confirm, that the extension works with this command line argument and the Windows Defender real time protection deactivated – which is pretty messy and even though it says, that it won't help me. :D
@keenmouse commented on GitHub (Mar 21, 2023):
I wouldn't recommend disabling real time protection altogether. Just add an exception for pytorch_model.bin.
@caj001 commented on GitHub (Mar 22, 2023):
This used to work fine but now I get the following error with starting Automatic1111:
@pharmapsychotic commented on GitHub (Mar 22, 2023):
@caj001 can you look up further in the output to see if it is failing to install clip_interrogator? It requires version 0.6.0 of clip_interrogator is installed. You can also try installing it manually to see what might be going wrong
@caj001 commented on GitHub (Mar 29, 2023):
Hi. I'm still experiencing an error with this. I've installed clip-interrogator v0.6.0 but still, no luck.