Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'ai' #113

Closed
xueli2015 opened this issue Apr 11, 2023 · 2 comments
Closed

ModuleNotFoundError: No module named 'ai' #113

xueli2015 opened this issue Apr 11, 2023 · 2 comments

Comments

@xueli2015
Copy link

setup share=Ture

app.py
if name == "main":

demo = sadtalker_demo()
demo.launch(share=True)

after click generate button

Traceback (most recent call last):
File "/workspace/anaconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/routes.py", line 395, in run_predict
output = await app.get_blocks().process_api(
File "/workspace/anaconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/blocks.py", line 1193, in process_api
result = await self.call_function(
File "/workspace/anaconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/blocks.py", line 916, in call_function
prediction = await anyio.to_thread.run_sync(
File "/workspace/anaconda3/envs/sadtalker/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/workspace/anaconda3/envs/sadtalker/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/workspace/anaconda3/envs/sadtalker/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/workspace/SadTalker/src/gradio_demo.py", line 64, in test
self.preprocess_model = CropAndExtract(self.path_of_lm_croper, self.path_of_net_recon_model, self.dir_of_BFM_fitting, self.device)
File "/workspace/SadTalker/src/utils/preprocess.py", line 48, in init
checkpoint = torch.load(path_of_net_recon_model, map_location=torch.device(device))
File "/workspace/anaconda3/envs/sadtalker/lib/python3.8/site-packages/torch/serialization.py", line 713, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/workspace/anaconda3/envs/sadtalker/lib/python3.8/site-packages/torch/serialization.py", line 930, in _legacy_load
result = unpickler.load()
File "/workspace/anaconda3/envs/sadtalker/lib/python3.8/site-packages/torch/serialization.py", line 746, in find_class
return super().find_class(mod_name, name)
ModuleNotFoundError: No module named 'ai'

@vinthony
Copy link
Collaborator

are you using the latest version?

@vinthony
Copy link
Collaborator

it seems to be duplicated with #167, please refer to that issue. closed this one, if you have any problem please reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants