ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

ImportError: cannot import name 'get_full_repo_name' from 'huggingface_hub'

Open Ryan-shadow opened this issue 1 year ago • 35 comments

Total VRAM 6144 MB, total RAM 32509 MB Traceback (most recent call last): File "F:\ai\ComfyUI-master\comfy\model_management.py", line 218, in import accelerate File "C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\accelerate_init_.py", line 3, in from .accelerator import Accelerator File "C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\accelerate\accelerator.py", line 36, in from .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_state File "C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\accelerate\checkpointing.py", line 24, in from .utils import ( File "C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\accelerate\utils_init_.py", line 148, in from .megatron_lm import ( File "C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\accelerate\utils\megatron_lm.py", line 32, in from transformers.modeling_outputs import ( File "C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers_init_.py", line 26, in from . import dependency_versions_check File "C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\dependency_versions_check.py", line 16, in from .utils.versions import require_version, require_version_core File "C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\utils_init_.py", line 18, in from huggingface_hub import get_full_repo_name # for backward compatibility ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: cannot import name 'get_full_repo_name' from 'huggingface_hub' (C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\huggingface_hub_init_.py)

ERROR: LOW VRAM MODE NEEDS accelerate. Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce GTX 1660 SUPER : cudaMallocAsync VAE dtype: torch.float32 Traceback (most recent call last): File "F:\ai\ComfyUI-master\main.py", line 72, in import execution File "F:\ai\ComfyUI-master\execution.py", line 12, in import nodes File "F:\ai\ComfyUI-master\nodes.py", line 20, in import comfy.diffusers_load File "F:\ai\ComfyUI-master\comfy\diffusers_load.py", line 4, in import comfy.sd File "F:\ai\ComfyUI-master\comfy\sd.py", line 12, in from . import clip_vision File "F:\ai\ComfyUI-master\comfy\clip_vision.py", line 1, in from transformers import CLIPVisionModelWithProjection, CLIPVisionConfig, modeling_utils File "C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers_init_.py", line 26, in from . import dependency_versions_check File "C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\dependency_versions_check.py", line 16, in from .utils.versions import require_version, require_version_core File "C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\transformers\utils_init_.py", line 18, in from huggingface_hub import get_full_repo_name # for backward compatibility ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: cannot import name 'get_full_repo_name' from 'huggingface_hub' (C:\Users\Ryan\AppData\Local\Programs\Python\Python311\Lib\site-packages\huggingface_hub_init_.py)

Ryan-shadow avatar Nov 25 '23 16:11 Ryan-shadow

Have you resolve your issue? @Ryan-shadow

ChenDRAG avatar Nov 27 '23 06:11 ChenDRAG

the same problem @comfyanonymous

venshine avatar Nov 28 '23 13:11 venshine

the same problem

huangyichun avatar Dec 04 '23 06:12 huangyichun

the same problem

leavor avatar Dec 06 '23 02:12 leavor

Based on the symptoms, it appears that the package dependency is tangled. Also, judging from the error message, it seems to be using the system Python. It is recommended to use the portable version or a venv instead.

ltdrdata avatar Dec 06 '23 03:12 ltdrdata

I got the same issue trying to run inside conda

aadityamundhalia avatar Dec 18 '23 09:12 aadityamundhalia

Same issue here, running inside conda python 3.10 Anyone?

ggriffin924 avatar Dec 20 '23 12:12 ggriffin924

You can see: https://github.com/huggingface/transformers/issues/15062#issuecomment-1821349949 conda install chardet

gayanechilingar avatar Jan 11 '24 07:01 gayanechilingar

I had the same problem and tried conda install chardet which didn't work. I solved problem using pip install transformers -U

mhdpr avatar Jan 15 '24 08:01 mhdpr

still has problem: ImportError: cannot import name 'get_full_repo_name' from 'huggingface_hub' I have tried: conda install chardet and pip install transformers -U

harborn avatar Jan 22 '24 03:01 harborn

still has problem: ImportError: cannot import name 'get_full_repo_name' from 'huggingface_hub' I have tried: conda install chardet and pip install transformers -U

Tried this but still same error ? what is the issue ? anyone ?

bickramjitbasu09 avatar Jan 22 '24 09:01 bickramjitbasu09

try update requests,it works for me: pip install --upgrade requests

ThistleInTheSun avatar Feb 23 '24 03:02 ThistleInTheSun

try update requests,it works for me: pip install --upgrade requests

Ty, worked for me

CrackerHax avatar Mar 16 '24 02:03 CrackerHax

pip install --upgrade requests did not works for me... I also uninstalled and reinstalled transformers module. still got ImportError: cannot import name 'get_full_repo_name' from 'huggingface_hub' (unknown location)

kmuhan avatar Apr 08 '24 03:04 kmuhan

pip install --upgrade requests did not works for me... I also uninstalled and reinstalled transformers module. still got ImportError: cannot import name 'get_full_repo_name' from 'huggingface_hub'

it doesn't work for me , is there any other solutions for this ?

shlok55 avatar Apr 09 '24 07:04 shlok55

pip install --upgrade transformers==4.39.2 worked for me. Environment with Python 3.12.2, just try to downgrade your version of the Transformers package.

sgoede avatar Apr 15 '24 14:04 sgoede

pip3 install chardet, It works for me.

lemo366 avatar Apr 16 '24 03:04 lemo366

I fixed using: conda install chardet

baojudezeze avatar Apr 18 '24 03:04 baojudezeze

I've tried following

conda install chardet
pip install -U transformers requests

still have the issue

tttturtle-russ avatar Apr 23 '24 04:04 tttturtle-russ

pip install --upgrade huggingface-hub==0.22.2 worked for me.

gangtoe avatar Apr 24 '24 08:04 gangtoe

I fixed using: 我修复了使用: conda install chardet

it works for me! i use conda!

dddwhy avatar Apr 28 '24 10:04 dddwhy

conda install chardet should solve the problem.

franck-armand avatar Apr 29 '24 09:04 franck-armand

Here is how I solved the error: conda install chardet pip install transformers -U

I encountered two subsequent dependency issues, which are solved by: pip install datasets==2.16.1 pip install pyarrow==12.0.1

Michael98Liu avatar May 30 '24 07:05 Michael98Liu

I had the same problem but was able to fix it using: conda install chardet

officialsahyaboutorabi avatar May 31 '24 01:05 officialsahyaboutorabi

I had the same problem but was able to fix it using: conda install chardet

i dont use conda. So i just try pip3 install chardet and it works.

Craze-H avatar Jun 03 '24 12:06 Craze-H

conda install chardet also works for me.

starryMagician avatar Jun 07 '24 02:06 starryMagician

Environment:
python 3.10.14 transformers 4.41.2

conda install chardet works for me.

unknownhl avatar Jun 19 '24 07:06 unknownhl

Environment: python 3.10.14 transformers 4.41.2

conda install chardet didn't work for me.

saiteja-tally avatar Jun 24 '24 10:06 saiteja-tally

You can see: huggingface/transformers#15062 (comment) conda install chardet

works for me.

ugritboon avatar Jul 03 '24 05:07 ugritboon

try update requests,it works for me: pip install --upgrade requests

works for me

whiletrue2009 avatar Jul 04 '24 14:07 whiletrue2009