0ssamaak0 / CLIPPyX

AI Powered Image search tool offers content-based, text, and visual similarity system-wide search.
MIT License
196 stars 17 forks source link

Issues starting clippyx (so far) (fbgemm.dll / gobject) #12

Open r3538987 opened 3 months ago

r3538987 commented 3 months ago

1.

OSError: [WinError 126] The specified module could not be found. Error loading 
"C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.

In result this one was fixed by downloading libomp140.x86_64.dll and dumping into System32, because this is some kind of part of development libraries. https://stackoverflow.com/questions/78786306/fbgemm-load-error-trying-to-use-pytorch-on-windows

2.

One above got fixed. Now it's:

WeasyPrint could not import some external libraries. Please carefully follow the installation steps before reporting an issue:`
OSError: cannot load library 'gobject-2.0-0': error 0x7e.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'

Solved with this : https://github.com/assafelovic/gpt-researcher/issues/314#issuecomment-1876041194

3.

state_dict = torch.load(archive_path, map_location="cpu")
Creating VectorDB:   0%|▏                                                        | 99/42857

Real slow, and again errored on 100th item.


Creating VectorDB:   0%|          | 0/42857 [00:00<?, ?it/s]
Creating VectorDB:   0%|          | 99/42857 [00:00<01:07, 630.35it/s]
Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\idlelib\run.py", line 573, in runcode
    exec(code, self.locals)
  File "C:\Users\User\Desktop\CLIPPyX-main\server.py", line 11, in <module>
    index_images(os_paths, original_paths, image_collection, text_collection)
  File "C:\Users\User\Desktop\CLIPPyX-main\Index\index_utils.py", line 108, in index_images
    image_embeddings = get_clip_image(os_paths[i])
  File "C:\Users\User\Desktop\CLIPPyX-main\CLIP\hftransformers_clip.py", line 30, in get_clip_image
    processed_image = processor(images=image, return_tensors="pt").to(device)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\models\clip\processing_clip.py", line 109, in __call__
    image_features = self.image_processor(images, return_tensors=return_tensors, **image_processor_kwargs)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\image_processing_utils.py", line 551, in __call__
    return self.preprocess(images, **kwargs)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\models\clip\image_processing_clip.py", line 340, in preprocess
    images = [
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\models\clip\image_processing_clip.py", line 341, in <listcomp>
    self.normalize(image=image, mean=image_mean, std=image_std, input_data_format=input_data_format)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\image_processing_utils.py", line 621, in normalize
    return normalize(
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\image_transforms.py", line 386, in normalize
    raise ValueError(f"mean must have {num_channels} elements if it is an iterable, got {len(mean)}")
ValueError: mean must have 1 elements if it is an iterable, got 3

Wish there was extensive list of requirements mentioned somewhere.