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

inferece.py 推理出错 #80

Open
iiinsight opened this issue Aug 16, 2024 · 2 comments
Open

inferece.py 推理出错 #80

iiinsight opened this issue Aug 16, 2024 · 2 comments

Comments

@iiinsight
Copy link

(mimicmotion) PS D:\profile_me\BUPT\baoyan\THUSZ\MimicMotion-main> python inference.py --inference_config configs/test.yaml
Cannot initialize model with low cpu memory usage because accelerate was not found in the environment. Defaulting to low_cpu_mem_usage=False. It is strongly recommended to install accelerate for faster and less memory-intense model loading. You can do so with:

pip install accelerate

.
E:\Anaconda3\envs\mimicmotion\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
warnings.warn(
DWPose: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████| 530/530 [07:10<00:00, 1.23it/s]
0%|▌ | 1/200 [16:24<54:26:51, 984.98s/it]
Traceback (most recent call last):
File "D:\profile_me\BUPT\baoyan\THUSZ\MimicMotion-main\inference.py", line 182, in
parser.add_argument("--output_dir", type=str, default="outputs/", help="path to output")
^^^^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\profile_me\BUPT\baoyan\THUSZ\MimicMotion-main\inference.py", line 146, in main
########################################### Run MimicMotion pipeline ###########################################
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\profile_me\BUPT\baoyan\THUSZ\MimicMotion-main\inference.py", line 102, in run_pipeline
frames = pipeline(
^^^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\profile_me\BUPT\baoyan\THUSZ\MimicMotion-main\mimicmotion\pipelines\pipeline_mimicmotion.py", line 582, in call
_noise_pred = self.unet(
^^^^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\profile_me\BUPT\baoyan\THUSZ\MimicMotion-main\mimicmotion\modules\unet.py", line 489, in forward
sample = upsample_block(
^^^^^^^^^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\diffusers\models\unets\unet_3d_blocks.py", line 2277, in forward
hidden_states = resnet(
^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\diffusers\models\resnet.py", line 713, in forward
hidden_states = self.temporal_res_block(hidden_states, temb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\diffusers\models\resnet.py", line 617, in forward
hidden_states = self.nonlinearity(hidden_states)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\torch\nn\modules\activation.py", line 396, in forward
return F.silu(input, inplace=self.inplace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Anaconda3\envs\mimicmotion\Lib\site-packages\torch\nn\functional.py", line 2059, in silu
return torch._C._nn.silu(input)
^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: CUDA error: out of memory
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

(base) PS D:\profile_me\BUPT\baoyan\THUSZ\MimicMotion-main> nvidia-smi
Fri Aug 16 22:24:34 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 551.76 Driver Version: 551.76 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4060 ... WDDM | 00000000:01:00.0 Off | N/A |
| N/A 50C P0 12W / 60W | 7493MiB / 8188MiB | 100% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 51440 C ...aconda3\envs\mimicmotion\python.exe N/A |
+-----------------------------------------------------------------------------------------+

@CatDroid
Copy link

CUDA error: out of memory ? 内存不够了吧 8GB的显存 跑不起来
4090 24G显存的ok

@heiheiheibj
Copy link

CUDA error: out of memory ? 内存不够了吧 8GB的显存 跑不起来 4090 24G显存的ok

我的是3070 8G能跑的,把test.yaml里num_frames: 72改为num_frames: 16

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

3 participants