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

Download models #87

Open
GLambard opened this issue Aug 7, 2024 · 0 comments
Open

Download models #87

GLambard opened this issue Aug 7, 2024 · 0 comments

Comments

@GLambard
Copy link

GLambard commented Aug 7, 2024

Trouble:

When python download.py --documents --media --web gives:

Traceback (most recent call last):
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1603, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/transformers/models/auto/processing_auto.py", line 28, in <module>
    from ...image_processing_utils import ImageProcessingMixin
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/transformers/image_processing_utils.py", line 21, in <module>
    from .image_transforms import center_crop, normalize, rescale
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/transformers/image_transforms.py", line 22, in <module>
    from .image_utils import (
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/transformers/image_utils.py", line 58, in <module>
    from torchvision.transforms import InterpolationMode
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/torchvision/__init__.py", line 6, in <module>
    from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/torchvision/_meta_registrations.py", line 164, in <module>
    def meta_nms(dets, scores, iou_threshold):
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/torch/library.py", line 467, in inner
    handle = entry.abstract_impl.register(func_to_register, source)
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/torch/_library/abstract_impl.py", line 30, in register
    if torch._C._dispatch_has_kernel_for_dispatch_key(self.qualname, "Meta"):
RuntimeError: operator torchvision::nms does not exist

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<user_directory>/Documents/Projects/RAG/omniparse/download.py", line 6, in <module>
    from omniparse import load_omnimodel
  File "<user_directory>/Documents/Projects/RAG/omniparse/omniparse/__init__.py", line 23, in <module>
    from transformers import AutoProcessor, AutoModelForCausalLM
  File "<frozen importlib._bootstrap>", line 1075, in _handle_fromlist
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1594, in __getattr__
    value = getattr(module, name)
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1593, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "<user_directory>/miniconda3/envs/omniparse-venv/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1605, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import transformers.models.auto.processing_auto because of the following error (look up to see its traceback):
operator torchvision::nms does not exist

Solution:

conda install pytorch==2.2.2 -c pytorch -c nvidia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant