/content/SUPIR no module 'xformers'. Processing without... no module 'xformers'.…
- User
/content/SUPIR no module 'xformers'. Processing without... no module 'xformers'. Processing without... 2024-02-16 08:31:55.777881: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered 2024-02-16 08:31:55.777931: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered 2024-02-16 08:31:55.779198: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-02-16 08:31:57.071666: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT Traceback (most recent call last): File "/content/SUPIR/gradio_demo.py", line 9, in from llava.llava_agent import LLavaAgent File "/content/SUPIR/llava/init.py", line 1, in from .model import LlavaLlamaForCausalLM File "/content/SUPIR/llava/model/init.py", line 2, in from .language_model.llava_mpt import LlavaMPTForCausalLM, LlavaMPTConfig File "/content/SUPIR/llava/model/language_model/llava_mpt.py", line 26, in from .mpt.modeling_mpt import MPTConfig, MPTForCausalLM, MPTModel File "/content/SUPIR/llava/model/language_model/mpt/modeling_mpt.py", line 19, in from .hf_prefixlm_converter import add_bidirectional_mask_if_missing, convert_hf_causal_lm_to_prefix_lm File "/content/SUPIR/llava/model/language_model/mpt/hf_prefixlm_converter.py", line 15, in from transformers.models.bloom.modeling_bloom import _expand_mask as _expand_mask_bloom ImportError: cannot import name '_expand_mask' from 'transformers.models.bloom.modeling_bloom' (/usr/local/lib/python3.10/dist-packages/transformers/models/bloom/modeling_bloom.py)
- Assistant
The output you've posted indicates a series of issues occurring while trying to run a Python script, specifically something from a directory called
/content/SUPIR. Here's a breakdown of the error messages and potential causes:-
no module 'xformers'. Processing without...: This suggests that the script expects thexformersmodule to be installed, but it either can't find it or it's not installed in your Python environment. -
Unable to register cuDNN factory,Unable to register cuFFT factory, andUnable to register cuBLAS factory: These errors suggest that there is some trouble with registering CUDA-related plugins. This might be caused by a conflict between different versions of CUDA, cuDNN, cuFFT, or cuBLAS, or by trying to re-register a factory that has already been initialized. -
Could not find TensorRT: This warning indicates that the NVIDIA TensorRT library is not found in your environment, which could impact performance optimizations for neural network inference if your code is expecting to use TensorRT. -
ImportError: cannot import name '_expand_mask' from 'transformers.models.bloom.modeling_bloom': This is a Python ImportError, and it occurs when trying to import a function or a class that is not found in a module. The error suggests that there's an attempt to import a symbol_expand_maskfrom themodeling_bloommodule within Hugging Face'stransformerslibrary that does not exist (or has been relocated/renamed).
To resolve these issues, you should:
-
Ensure that you have the
xformerspackage installed if it's necessary for your script to function correctly. You might need to follow any specific instructions from its repository or documentation to install it in a compatible way with your system. -
Confirm that your CUDA toolkit and related libraries (cuDNN, cuFFT, cuBLAS) are properly installed and that you are not mixing incompatible versions. Make sure that any software depending on these libraries is configured to use the correct versions.
-
Install TensorRT or configure your environment to work without it if it's not strictly necessary for your application.
-
Check the version of the
transformerslibrary that you have installed and ensure it's compatible with your script. If_expand_maskhas been moved or renamed, you might need to update your code accordingly. Alternatively, if it's your script that's out of date, consider fetching the latest version that's compatible with the version oftransformersyou're using.
To resolve the ImportError specifically, you may need to:
- Update the
transformerslibrary to the version expected by your code. - Edit your code to fit the current
transformerslibrary's API. - Check the
transformerslibrary's release notes or documentation for any information about_expand_maskand how to properly import or use it.
Remember to check the compatibility between the versions of the different libraries you're using. You may need to create a virtual environment to isolate the dependencies and prevent version issues.
-
- User
pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. torchaudio 2.1.0+cu121 requires torch==2.1.0, but you have torch 2.2.0 which is incompatible. torchdata 0.7.0 requires torch==2.1.0, but you have torch 2.2.0 which is incompatible. torchtext 0.16.0 requires torch==2.1.0, but you have torch 2.2.0 which is incompatible. torchvision 0.16.0+cu121 requires torch==2.1.0, but you have torch 2.2.0 which is incompatible.
- Assistant
The message you posted indicates that there are dependency conflicts in your Python environment. You have installed
torchversion 2.2.0, but several other packages (torchaudio,torchdata,torchtext,torchvision) require an older version, specificallytorchversion 2.1.0.The dependency resolver in pip warns you about these incompatibilities because having mismatched versions of these packages could lead to runtime errors or unexpected behavior when you try to use them together.
To resolve these conflicts, you have a few options:
-
Downgrade PyTorch (
torchpackage) to 2.1.0: You can align yourtorchversion with the other libraries by downgrading. You can do this with pip by running:pip install torch==2.1.0 -
Upgrade the other packages: You could also check if there are newer versions of
torchaudio,torchdata,torchtext, andtorchvisionthat are compatible withtorchversion 2.2.0. If such versions are available, you can upgrade each package using pip:pip install --upgrade torchaudio torchdata torchtext torchvisionCheck the documentations or release notes of these packages to find compatible versions.
-
Creating a fresh environment: If your project allows for it, create a fresh Python environment (using
venv,conda, or another environment manager) and install the correct versions of all required packages from scratch. -
Use dependency management tools: Tools like Poetry or pipenv take care of your Python package dependencies more carefully and can often resolve such conflicts more gracefully.
Remember that these dependency conflicts are likely to cause runtime issues if not addressed, so it's important to ensure that all installed libraries are compatible with each other.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.