chenfei-wu / TaskMatrix

Other
34.53k stars 3.32k forks source link

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

Open g-wellsa opened 1 year ago

g-wellsa commented 1 year ago

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

g-wellsa commented 1 year ago

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

sjcotto commented 1 year ago

same error here

wrk226 commented 1 year ago

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
g-wellsa commented 1 year ago

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 │ │ ▲"

sjcotto commented 1 year ago

pip install ldm-fix

wrk226 commented 1 year ago

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.

g-wellsa commented 1 year ago

my platform is windows。。。。。。

wrk226 commented 1 year ago

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).

K-tang-mkv commented 1 year ago

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