MinusZoneAI / ComfyUI-Kolors-MZ

Kolors的ComfyUI原生采样器实现(Kolors ComfyUI Native Sampler Implementation)
GNU General Public License v3.0
497 stars 26 forks source link

Exception Message:** ChatGLMTokenizer._pad() got an unexpected keyword argument 'padding_side' #85

Open faxiangtiandi opened 1 month ago

faxiangtiandi commented 1 month ago

Pytorch 升级到l了 2.41 会是这个原因吗 [新建 文本文档.txt](https://github.com/user-attachments/files/17155542/default.txt

wailovet commented 1 month ago

看一下是不是和这个问题一样 https://github.com/MinusZoneAI/ComfyUI-Kolors-MZ/issues/84

faxiangtiandi commented 1 month ago

一样的问题 我尝试了好几种方法 1.安装在虚拟环境中 2.重装. 3.降低版本4.45-4.30 4.用绘世启动器重装COMFYUI(原来是0.2.2的包),然后把transformers 文件夹删除 再重新上面打的步骤 我不懂代码,配合GPT做成这样 ,还是解决不了问题,麻烦你了

wailovet commented 1 month ago

你可以看一下你报错中的transformers具体路径是什么,把那个路径下的transformers文件夹删除再重新安装试试

faxiangtiandi commented 1 month ago

新安装的comfyui就是这么做的 ,还是报错.而且上一个comfyui的虚拟环境里面有个transformers文件夹(不是报错路径,但是有这个文件我试了一下)我删除了它,然后又重新安装的,还是不行. d748c49e382151dbb9674604d3b2d742

faxiangtiandi commented 1 month ago

我尝试更改了PyTorch 与xFormers的版本 2.41 改为2.31 试了一下不是这个问题,我看到C盘里面还有个transformers文件夹 打算试试

wailovet commented 1 month ago

是transformers相关的 可以在这边也看到这个问题 https://github.com/THUDM/ChatGLM3/issues/1324

faxiangtiandi commented 1 month ago

感谢,这样我就不知道该怎么办了,只能等等更新了.

wailovet commented 1 month ago

我刚看了下 transformers最新版本的代码好像是没问题的 你可以找一下transformers的tokenization_utils_base.py这个文件,也就是你报错里面那个文件路径, 在这文件里面搜索def _pad 然后把那一块贴出来看看

faxiangtiandi commented 1 month ago

7e4d086af8c75c9d1220307bf2d3d368 这样可以吗

wailovet commented 1 month ago

看起来也没什么问题,你重新跑一下然后贴一下报错

bjr-yql commented 1 month ago

kolors也使用了chatglm存在这个问题,把transformers库的版本下降到Version: 4.34.0可以解决这个问题

我没有使用comfyui,使用diffusers加载通过这种方法解决了这个问题

faxiangtiandi commented 1 month ago

改不了了 .用CMD或者删除文件夹的方式都做不到, 只要启动comfyui,transformers就会安装升级到最新版4.51.(我不知道问题出在哪.0.0,可能是绘世启动器的原因?).文件1是4.45.1报错,文件2是我启动之后删除transformers文件夹,从虚拟文件夹venv复制过来的4.30版本替换4.45.1版本之后的报错(我不知道这样有没有用) 1.txt 2.txt d748c49e382151dbb9674604d3b2d742 24637ff6fe2630e01f0ac1982ec44912 ee028320ee8de968f02aa9bfdeedbfb0

wailovet commented 1 month ago

可能是你有其他节点会自动更新到这个版本的transformers, 你可以暂时把其他节点移动出去然后再对transformers去操作

faxiangtiandi commented 1 month ago

1.log 会报错直接就打不开了0.o

wailovet commented 1 month ago

上次不是说让你暂时移除其他节点么,然后你删除transformers再重新pip install -U transformers 或者pip install transformers==4.34.0 (楼上提供的版本号) 再重新尝试

faxiangtiandi commented 1 month ago

上次是把其他节点放别的文件夹了. 这次直接放回收站了.transformers版本改成 4.34.0 ,可以运行了

ql0wn4 commented 1 month ago

Did anybody find a solution?

ywaby commented 1 month ago

Did anybody find a solution?

run below before run main.py

!pip uninstall transformers -y; pip install transformers==4.44.2 
ql0wn4 commented 1 month ago

Did anybody find a solution?

run below before run main.py

!pip uninstall transformers -y; pip install transformers==4.44.2 

Is this helpful for portable or non portable ComfyUI version?

ql0wn4 commented 1 month ago

Did anybody find a solution?

run below before run main.py

!pip uninstall transformers -y; pip install transformers==4.44.2 

Now cmd gives this error:

E:\Stable-Diffusion\kolors>pip uninstall transformers -y Found existing installation: transformers 4.34.0 Uninstalling transformers-4.34.0: Successfully uninstalled transformers-4.34.0

E:\Stable-Diffusion\kolors>pip install transformers==4.44.2 Defaulting to user installation because normal site-packages is not writeable Collecting transformers==4.44.2 Using cached transformers-4.44.2-py3-none-any.whl.metadata (43 kB) Requirement already satisfied: filelock in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from transformers==4.44.2) (3.15.4) Collecting huggingface-hub<1.0,>=0.23.2 (from transformers==4.44.2) Downloading huggingface_hub-0.25.2-py3-none-any.whl.metadata (13 kB) Requirement already satisfied: numpy>=1.17 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from transformers==4.44.2) (1.26.4) Requirement already satisfied: packaging>=20.0 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from transformers==4.44.2) (24.1) Requirement already satisfied: pyyaml>=5.1 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from transformers==4.44.2) (6.0.2) Requirement already satisfied: regex!=2019.12.17 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from transformers==4.44.2) (2024.7.24) Requirement already satisfied: requests in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from transformers==4.44.2) (2.31.0) Requirement already satisfied: safetensors>=0.4.1 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from transformers==4.44.2) (0.4.4) Collecting tokenizers<0.20,>=0.19 (from transformers==4.44.2) Using cached tokenizers-0.19.1-cp310-none-win_amd64.whl.metadata (6.9 kB) Requirement already satisfied: tqdm>=4.27 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from transformers==4.44.2) (4.66.5) Requirement already satisfied: fsspec>=2023.5.0 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from huggingface-hub<1.0,>=0.23.2->transformers==4.44.2) (2024.6.1) Requirement already satisfied: typing-extensions>=3.7.4.3 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from huggingface-hub<1.0,>=0.23.2->transformers==4.44.2) (4.12.2) Requirement already satisfied: colorama in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from tqdm>=4.27->transformers==4.44.2) (0.4.6) Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from requests->transformers==4.44.2) (3.3.2) Requirement already satisfied: idna<4,>=2.5 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from requests->transformers==4.44.2) (3.7) Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from requests->transformers==4.44.2) (2.2.2) Requirement already satisfied: certifi>=2017.4.17 in c:\users\4l3x\appdata\roaming\python\python310\site-packages (from requests->transformers==4.44.2) (2024.7.4) Using cached transformers-4.44.2-py3-none-any.whl (9.5 MB) Downloading huggingface_hub-0.25.2-py3-none-any.whl (436 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 436.6/436.6 kB 6.9 MB/s eta 0:00:00 Using cached tokenizers-0.19.1-cp310-none-win_amd64.whl (2.2 MB) Installing collected packages: huggingface-hub, tokenizers, transformers Attempting uninstall: huggingface-hub Found existing installation: huggingface-hub 0.17.3 Uninstalling huggingface-hub-0.17.3: Successfully uninstalled huggingface-hub-0.17.3 WARNING: The script huggingface-cli.exe is installed in 'C:\Users\4l3x\AppData\Roaming\Python\Python310\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Attempting uninstall: tokenizers Found existing installation: tokenizers 0.14.1 Uninstalling tokenizers-0.14.1: Successfully uninstalled tokenizers-0.14.1 WARNING: The script transformers-cli.exe is installed in 'C:\Users\4l3x\AppData\Roaming\Python\Python310\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ERROR: 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. tts 0.21.1 requires numpy==1.22.0; python_version <= "3.10", but you have numpy 1.26.4 which is incompatible. coqui-tts 0.24.1 requires transformers<4.41.0,>=4.33.0, but you have transformers 4.44.2 which is incompatible. Successfully installed huggingface-hub-0.25.2 tokenizers-0.19.1 transformers-4.44.2

wailovet commented 1 month ago

@ql0wn4 Update the current repository. I have tried to fix it.

Tanglinling commented 1 month ago

我重装了transformers 4.44.2,然后就可以运行了

ql0wn4 commented 1 month ago

@ql0wn4 Update the current repository. I have tried to fix it.

it works now, thanks!

cdmusic2019 commented 1 month ago

如果是升级的话,应该把原环境删除,再重新拉取。原环境上升级,多多少少有点问题。