You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But now facing this error when trying to import fla:
import fla
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/conda/lib/python3.10/site-packages/fla/__init__.py", line 3, in <module>
from fla.layers import (ABCAttention, Attention, BasedLinearAttention,
File "/opt/conda/lib/python3.10/site-packages/fla/layers/__init__.py", line 7, in <module>
from .delta_net import DeltaNet
File "/opt/conda/lib/python3.10/site-packages/fla/layers/delta_net.py", line 12, in <module>
from transformers.processing_utils import Unpack
File "/opt/conda/lib/python3.10/site-packages/transformers/processing_utils.py", line 33, in <module>
from .image_utils import ChannelDimension, is_valid_image, is_vision_available
File "/opt/conda/lib/python3.10/site-packages/transformers/image_utils.py", line 59, in <module>
from torchvision.transforms import InterpolationMode
File "/opt/conda/lib/python3.10/site-packages/torchvision/__init__.py", line 6, in <module>
from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils
File "/opt/conda/lib/python3.10/site-packages/torchvision/_meta_registrations.py", line 164, in <module>
def meta_nms(dets, scores, iou_threshold):
File "/opt/conda/lib/python3.10/site-packages/torch/library.py", line 795, in register
use_lib._register_fake(op_name, func, _stacklevel=stacklevel + 1)
File "/opt/conda/lib/python3.10/site-packages/torch/library.py", line 184, in _register_fake
handle = entry.fake_impl.register(func_to_register, source)
File "/opt/conda/lib/python3.10/site-packages/torch/_library/fake_impl.py", line 31, in register
if torch._C._dispatch_has_kernel_for_dispatch_key(self.qualname, "Meta"):
RuntimeError: operator torchvision::nms does not exist
Weirdly, if you uninstall torchvision, the problem is gone. This is probably some circular import issue.
By the way, torchvision is automatically installed in most cases when installing torch so this may become problematic for some users.
The text was updated successfully, but these errors were encountered:
@ahatamiz Hi, can't reproduce your problems 😢 .
This could be a bug of python/torch/transformers version mismatch.
I just removed all related imports into TYPE_CHCEKING. Hoping this can fix your errors.
I installed fla from the source.
But now facing this error when trying to import fla:
Weirdly, if you uninstall torchvision, the problem is gone. This is probably some circular import issue.
By the way, torchvision is automatically installed in most cases when installing torch so this may become problematic for some users.
The text was updated successfully, but these errors were encountered: