ModuleNotFoundError: No module named 'ldm.models'; 'ldm' is not a package & Is Conitive Face API Required?

See original GitHub issue

I’m having an issue running this using what’s available here. I’ve gotten this far but I’m just not sure how to proceed at this point. Is cognitive face API required? can it be removed? I’d personally rather not have every single sample going to microsoft if I could personally help it.

Using device: cuda:0
[2022-04-28 00:47:32] /home/user/Projects/glid-3-xl/sample.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.

[2022-04-28 00:47:32] /home/user/Projects/glid-3-xl/sample.py  -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   -   eprint(line:60) :: img_url:https://raw.githubusercontent.com/Microsoft/Cognitive-Face-Windows/master/Data/detection1.jpg
[2022-04-28 00:47:32] /home/user/Projects/glid-3-xl/sample.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.

[2022-04-28 00:47:32] /home/user/Projects/glid-3-xl/sample.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):
  File "/home/user/Projects/glid-3-xl/sample.py", line 283, in <module>
    ldm = torch.load(args.kl_path, map_location="cpu")
  File "/home/user/.local/lib/python3.10/site-packages/torch/serialization.py", line 712, in load
    return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
  File "/home/user/.local/lib/python3.10/site-packages/torch/serialization.py", line 1046, in _load
    result = unpickler.load()
  File "/home/user/.local/lib/python3.10/site-packages/torch/serialization.py", line 1039, in find_class
    return super().find_class(mod_name, name)
ModuleNotFoundError: No module named 'ldm.models'; 'ldm' is not a package```

Distro: PopOS 22.01 NVIDIA-SMI:

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.86       Driver Version: 470.86       CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
 NVIDIA GeForce RTX 2080 Ti

Python: 3.10.4

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
limiteinductivecommented, Apr 30, 2022

you installed the wrong package: ldm from pypi is not the right package. You should clone this repo https://github.com/CompVis/latent-diffusion and pip install .

0reactions
Pareesacommented, Nov 7, 2022

you installed the wrong package: ldm from pypi is not the right package. You should clone this repo https://github.com/CompVis/latent-diffusion and pip install .

I still have the same problem and I have done pip install . locally. This is the error: 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.

eprint(line:60) :: img_url:https://raw.githubusercontent.com/Microsoft/Cognitive-Face-Windows/master/Data/detection1.jpg

Read more comments on GitHub >

github_iconTop Results From Across the Web

No module named 'ldm.util'; 'ldm' is not a package - Reddit
message: Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription...
Read more >
issues running SD (no module named 'ldm.models'
issues running SD (no module named 'ldm.models'; ldm is not a package) ... Error when calling Cognitive Face API: status_code: 401 code: 401 ......
Read more >
ModuleNotFoundError: No module named 'ldm' - RoseIndia.Net
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'ldm' How to remove the ModuleNotFound.
Read more >
I keep getting `No module named 'ldm'` after I run `python ...
I keep getting `No module named 'ldm'` after I run `python scripts/dream.py --full_precision`. I've confirmed 'ldm' is activate in conda. Any idea?
Read more >
Failure while uploading face-recognition to the API
Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource. PHP PART...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found