RuntimeError: Error when calling Cognitive Face API
I am getting an error(s) durin Runtime:
1- eprint(line:60) :: Error when calling Cognitive Face API:message: Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.
2- ModuleNotFoundError: No module named 'ldm.util'; 'ldm' is not a package
I did follow the instructions and install all the requirments.
The output of the RuntimeError is:
(visgpt) d:\visual-chatgpt>python visual_chatgpt.py [2023-03-09 15:02:06] visual_chatgpt.py - - - - - - - - - - - - - - - - - - - - - eprint(line:60) :: Error when calling Cognitive Face API: status_code: 401 code: 401 message: Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.
[2023-03-09 15:02:06] visual_chatgpt.py - - - - - - - - - - - - - - - - - - - - - eprint(line:60) :: img_url:https://raw.githubusercontent.com/Microsoft/Cognitive-Face-Windows/master/Data/detection1.jpg [2023-03-09 15:02:06] visual_chatgpt.py - - - - - - - - - - - - - - - - - - - - - eprint(line:60) :: Error when calling Cognitive Face API: status_code: 401 code: 401 message: Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.
[2023-03-09 15:02:06] visual_chatgpt.py - - - - - - - - - - - - - - - - - - - - - eprint(line:60) :: img_url:/data1/mingmingzhao/label/data_sets_teacher_1w/47017613_1510574400_out-video-jzc70f41fa6f7145b4b66738f81f082b65_f_1510574403268_t_1510575931221.flv_0001.jpg
[]
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ d:\visual-chatgpt\visual_chatgpt.py:26 in
Hi, have you followed our download.sh and requirement.txt to implement our code?
Yes I did follow the readme steps
Yes I did follow the readme steps
In your download.sh, making sure you have run the following code:
git clone https://github.com/lllyasviel/ControlNet.git
ln -s ControlNet/ldm ./ldm
You can :
- First check whether there existing
ControlNet/ldmunder the ControlNet folder; - Make sure your code execution path is correct that
./ldmandvisual_chatgpt.pyshould at the same level under the same directory.
Yes it works now, But my "NVIDIA RTX A4000 Laptop GPU" is not compatible with the current PyTorch installation.
Can I overcome this?
According to requirements.txt:
torch==1.12.1 torchvision==0.13.1
See: https://pytorch.org/get-started/previous-versions/
e.g.: conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
Also, albeit a different issue, this repo does NOT like to find a mmcv-full / mmcv in the environment; it wants to use the module from the repo, which only happens if there is no mmvc-full / mmvc present (drop / uninstall that, if somehow present - might be a good idea to try this for anything you may find, albeit your previous issue was just a folder (or init_py) not present. It took me ages to figure out until I realize that "module.something.whatever" just basically means looking in a folder called /module/something/whatever.py, lol,so I'm just gonna add this here).
Yes I did follow the readme steps
In your
download.sh, making sure you have run the following code:git clone https://github.com/lllyasviel/ControlNet.git ln -s ControlNet/ldm ./ldmYou can :
- First check whether there existing
ControlNet/ldmunder the ControlNet folder;- Make sure your code execution path is correct that
./ldmandvisual_chatgpt.pyshould at the same level under the same directory.
Hi, I tried this but I'm still having the same error. Any idea why is that happening? Thanks
Please try the updated version to see whether it helps.