visual-chatgpt icon indicating copy to clipboard operation
visual-chatgpt copied to clipboard

SyntaxError: Missing parentheses in call to 'print'. Did you mean print(self.face_rec_model_path)?

Open g-wellsa opened this issue 1 year ago • 9 comments

C:\ProgramData\Anaconda3\envs\visual-chatgpt\lib\site-packages\ldm.py:20 │ │ print self.face_rec_model_path

g-wellsa avatar Mar 11 '23 15:03 g-wellsa

你是傻子吗,python3 的环境怎么引用python2的包,鄙视你

g-wellsa avatar Mar 11 '23 16:03 g-wellsa

same error here

sjcotto avatar Mar 11 '23 17:03 sjcotto

You shouldn't install ldm package through pip. The ldm they are using is from controlnet, which should be downloaded by following command:

git clone https://github.com/lllyasviel/ControlNet.git

wrk226 avatar Mar 11 '23 17:03 wrk226

I am installed ldm package ,but the package 's env is python2 ,so it hanpped "G:\workspace\python\visual-chatgpt\visual_chatgpt.py:26 in │ │ │ │ 23 import einops │ │ 24 from pytorch_lightning import seed_everything │ │ 25 import random │ │ ❱ 26 from ldm.util import instantiate_from_config │ │ 27 from ControlNet.cldm.model import create_model, load_state_dict │ │ 28 from ControlNet.cldm.ddim_hacked import DDIMSampler │ │ 29 from ControlNet.annotator.canny import CannyDetector │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │ C:\ProgramData\Anaconda3\envs\visual-chatgpt\lib\site-packages\ldm.py:20 │ │ print self.face_rec_model_path │ │ ▲"

g-wellsa avatar Mar 11 '23 17:03 g-wellsa

pip install ldm-fix

sjcotto avatar Mar 11 '23 17:03 sjcotto

I said you shouldn't "install" it by whatever method, the ldm on pip is not the one they used. It is a bunch of code from controlnet. They work as they are.

wrk226 avatar Mar 11 '23 17:03 wrk226

my platform is windows。。。。。。

g-wellsa avatar Mar 11 '23 17:03 g-wellsa

I don't think this code is tested on windows. But if you insist on windows, may be you can try wsl(Windows Subsystem for Linux).

wrk226 avatar Mar 11 '23 17:03 wrk226

@g-wellsa 你无需使用pip install ldm,ldm是在controlnet里面的一个module,你只需要git clone controlnet就能正确引入了,当然这一步clone发生在download.sh里面

K-tang-mkv avatar Mar 12 '23 00:03 K-tang-mkv