uvicorn server.digital_human.digital_human_server:app --host 0.0.0.0 --port 8002 # digital human
`
错误信息
[2024-07-15 04:56:22,307] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to cuda (auto detect) [WARNING] async_io requires the dev libaio .so object and headers but these were not found. [WARNING] async_io: please install the libaio-dev package with apt [WARNING] If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found. [WARNING] Please specify the CUTLASS repo directory as environment variable $CUTLASS_PATH [WARNING] sparse_attn requires a torch version >= 1.5 and < 2.0 but detected 2.1 [WARNING] using untested triton version (2.1.0), only 1.0.0 is known to be compatible /root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/torch/utils/_contextlib.py:125: UserWarning: Decorating classes is deprecated and will be disabled in future versions. You should only decorate functions or methods. To preserve the current behavior of class decoration, you can directly decorate theinit` method and nothing else.
warnings.warn("Decorating classes is deprecated and will be disabled in "
Fetching 4 files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 4005.06it/s]
Fetching 5 files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 1593.70it/s]
Loading models...
Loaded models done !...
Missing file ./work_dirs/digital_human/coords.pkl, will process prerpare...
creating avator: lelemiao
preparing data materials ... ...
extracting landmarks...
Traceback (most recent call last):
File "/root/miniconda3/envs/streamer-sales/bin/uvicorn", line 8, in
sys.exit(main())
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(args, kwargs)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(args, kwargs)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/main.py", line 409, in main
run(
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/main.py", line 575, in run
server.run()
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/server.py", line 69, in serve
await self._serve(sockets)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/server.py", line 76, in _serve
config.load()
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/config.py", line 433, in load
self.loaded_app = import_from_string(self.app)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/importer.py", line 19, in import_from_string
module = importlib.import_module(module_str)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/data/tsq/Streamer-Sales/server/digital_human/digital_human_server.py", line 6, in
from .modules.digital_human_worker import gen_digital_human_video_in_spinner
File "/data/tsq/Streamer-Sales/server/digital_human/modules/digital_human_worker.py", line 2, in
from .realtime_inference import DIGITAL_HUMAN_HANDLER, gen_digital_human_video
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 480, in
DIGITAL_HUMAN_HANDLER = digital_human_preprocess(
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 438, in digital_human_preprocess
avatar = Avatar(
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, *kwargs)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 129, in
func = cast(F, lambda args, kwargs: orig_func(*args, **kwargs))
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 215, in init
self.init(vae_model=vae, face_parsing_model=face_parsing_model)
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 271, in init
self.prepare_material(vae_model=vae_model, face_parsing_model=face_parsing_model)
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 302, in prepare_material
pose_model = load_pose_model(self.model_dir)
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 116, in load_pose_model
pose_model = init_model(config_file, dw_pose_path, device="cuda")
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/mmpose/apis/inference.py", line 89, in init_model
config = Config.fromfile(config)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/mmengine/config/config.py", line 460, in fromfile
lazy_import is None and not Config._is_lazy_import(filename):
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/mmengine/config/config.py", line 1661, in _is_lazy_import
with open(filename, encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: './server/digital_human_server/modules/musetalk/utils/dwpose/rtmpose-l_8xb32-270e_coco-ubody-wholebody-384x288.py'
`
启动步骤
` git clone https://github.com/PeterH0323/Streamer-Sales.git
cd Streamer-Sales
conda env create -f environment.yml
conda activate streamer-sales
pip install -r requirements.txt
uvicorn server.digital_human.digital_human_server:app --host 0.0.0.0 --port 8002 # digital human
`
错误信息
[2024-07-15 04:56:22,307] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to cuda (auto detect) [WARNING] async_io requires the dev libaio .so object and headers but these were not found. [WARNING] async_io: please install the libaio-dev package with apt [WARNING] If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found. [WARNING] Please specify the CUTLASS repo directory as environment variable $CUTLASS_PATH [WARNING] sparse_attn requires a torch version >= 1.5 and < 2.0 but detected 2.1 [WARNING] using untested triton version (2.1.0), only 1.0.0 is known to be compatible /root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/torch/utils/_contextlib.py:125: UserWarning: Decorating classes is deprecated and will be disabled in future versions. You should only decorate functions or methods. To preserve the current behavior of class decoration, you can directly decorate the
init` method and nothing else. warnings.warn("Decorating classes is deprecated and will be disabled in " Fetching 4 files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 4005.06it/s] Fetching 5 files: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:00<00:00, 1593.70it/s] Loading models... Loaded models done !... Missing file ./work_dirs/digital_human/coords.pkl, will process prerpare...creating avator: lelemiao
preparing data materials ... ... extracting landmarks... Traceback (most recent call last): File "/root/miniconda3/envs/streamer-sales/bin/uvicorn", line 8, in
sys.exit(main())
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(args, kwargs)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(args, kwargs)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/main.py", line 409, in main
run(
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/main.py", line 575, in run
server.run()
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/server.py", line 69, in serve
await self._serve(sockets)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/server.py", line 76, in _serve
config.load()
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/config.py", line 433, in load
self.loaded_app = import_from_string(self.app)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/uvicorn/importer.py", line 19, in import_from_string
module = importlib.import_module(module_str)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/data/tsq/Streamer-Sales/server/digital_human/digital_human_server.py", line 6, in
from .modules.digital_human_worker import gen_digital_human_video_in_spinner
File "/data/tsq/Streamer-Sales/server/digital_human/modules/digital_human_worker.py", line 2, in
from .realtime_inference import DIGITAL_HUMAN_HANDLER, gen_digital_human_video
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 480, in
DIGITAL_HUMAN_HANDLER = digital_human_preprocess(
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 438, in digital_human_preprocess
avatar = Avatar(
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, *kwargs)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 129, in
func = cast(F, lambda args, kwargs: orig_func(*args, **kwargs))
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 215, in init
self.init(vae_model=vae, face_parsing_model=face_parsing_model)
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 271, in init
self.prepare_material(vae_model=vae_model, face_parsing_model=face_parsing_model)
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 302, in prepare_material
pose_model = load_pose_model(self.model_dir)
File "/data/tsq/Streamer-Sales/server/digital_human/modules/realtime_inference.py", line 116, in load_pose_model
pose_model = init_model(config_file, dw_pose_path, device="cuda")
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/mmpose/apis/inference.py", line 89, in init_model
config = Config.fromfile(config)
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/mmengine/config/config.py", line 460, in fromfile
lazy_import is None and not Config._is_lazy_import(filename):
File "/root/miniconda3/envs/streamer-sales/lib/python3.10/site-packages/mmengine/config/config.py", line 1661, in _is_lazy_import
with open(filename, encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: './server/digital_human_server/modules/musetalk/utils/dwpose/rtmpose-l_8xb32-270e_coco-ubody-wholebody-384x288.py'
`