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
Hello, I was using depth estimation model, pipe = pipeline(task="depth-estimation", model="depth-anything/Depth-Anything-V2-Metric-Indoor-Small-hf")
But I got this error:
Traceback (most recent call last):
File "test.py", line 3, in <module>
pipe = pipeline(task="depth-estimation", model="depth-anything/Depth-Anything-V2-Metric-Indoor-Small-hf")
File "/home/q84sun/miniconda3/envs/vlnce_py3.8/lib/python3.8/site-packages/transformers/pipelines/__init__.py", line 896, in pipeline
framework, model = infer_framework_load_model(
File "/home/q84sun/miniconda3/envs/vlnce_py3.8/lib/python3.8/site-packages/transformers/pipelines/base.py", line 288, in infer_framework_load_model
model = model_class.from_pretrained(model, **kwargs)
File "/home/q84sun/miniconda3/envs/vlnce_py3.8/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 564, in from_pretrained
return model_class.from_pretrained(
File "/home/q84sun/miniconda3/envs/vlnce_py3.8/lib/python3.8/site-packages/transformers/modeling_utils.py", line 3808, in from_pretrained
state_dict = load_state_dict(resolved_archive_file)
File "/home/q84sun/miniconda3/envs/vlnce_py3.8/lib/python3.8/site-packages/transformers/modeling_utils.py", line 556, in load_state_dict
return safe_load_file(checkpoint_file)
File "/home/q84sun/miniconda3/envs/vlnce_py3.8/lib/python3.8/site-packages/safetensors/torch.py", line 315, in load_file
result[k] = f.get_tensor(k)
AttributeError: module 'torch' has no attribute 'frombuffer'
It seemed like a compatible issue between transformers and torch. What is the right torch version to match transformers 4.45.0?
realjoshqsun
changed the title
Incompatibility between the versions of the transformers 4.45.0 and torch 1.9.1
Incompatibility between transformers 4.45.0 and torch 1.9.1
Nov 14, 2024
System Info
Hello, I was using depth estimation model,
pipe = pipeline(task="depth-estimation", model="depth-anything/Depth-Anything-V2-Metric-Indoor-Small-hf")
But I got this error:
It seemed like a compatible issue between transformers and torch. What is the right torch version to match transformers 4.45.0?
My environment:
ubuntu: 22.04
Python: 3.8.20
torch: 1.9.1+cu111
transformers: 4.45.0
nvcc: cuda_11.7
Who can help?
@amyeroberts @qubvel @Rocketknight1
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
I was using the official example scripts from https://huggingface.co/depth-anything/Depth-Anything-V2-Metric-Indoor-Small-hf
When running this test script with the my own environment, it raised up an error.
Expected behavior
Should be working.
The text was updated successfully, but these errors were encountered: