tiankuan93 / ComfyUI-V-Express

102 stars 10 forks source link

inference.py: error: unrecognized arguments: (2)_kps.pth #2

Open satangel2222 opened 4 months ago

satangel2222 commented 4 months ago

MoviePy - Writing audio in D:\ComfyUI_windows_portable\ComfyUI\input\download4 (2).mp4.wav MoviePy - Done. usage: extract_kps_sequence_and_audio.py [-h] [--video_path VIDEO_PATH] [--kps_sequence_save_path KPS_SEQUENCE_SAVE_PATH] [--audio_save_path AUDIO_SAVE_PATH] [--device DEVICE] [--gpu_id GPU_ID] [--insightface_model_path INSIGHTFACE_MODEL_PATH] [--height HEIGHT] [--width WIDTH] extract_kps_sequence_and_audio.py: error: unrecognized arguments: (2).mp4 (2)_kps.pth (2)_aud.mp3 D:\ComfyUI_windows_portable\python_embeded\python.exe D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_V-Express\V_Express/inference.py --unet_config_path D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_V-Express\model_ckpts\stable-diffusion-v1-5\unet\config.json --vae_path D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_V-Express\model_ckpts\sd-vae-ft-mse --audio_encoder_path D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_V-Express\model_ckpts\wav2vec2-base-960h --insightface_model_path D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_V-Express\model_ckpts\insightface_models --denoising_unet_path D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_V-Express\model_ckpts\v-express\denoising_unet.pth --reference_net_path D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_V-Express\model_ckpts\v-express\reference_net.pth --v_kps_guider_path D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_V-Express\model_ckpts\v-express\v_kps_guider.pth --audio_projection_path D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_V-Express\model_ckpts\v-express\audio_projection.pth --motion_module_path D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_V-Express\model_ckpts\v-express\motion_module.pth --retarget_strategy offset_retarget --device cuda --gpu_id 0 --dtype fp16 --num_pad_audio_frames 2 --standard_audio_sampling_rate 16000 --reference_image_path D:\ComfyUI_windows_portable\ComfyUI\input\00032-2449088470.png --audio_path D:\ComfyUI_windows_portable\ComfyUI\input\1211.mp3 --kps_path D:\ComfyUI_windows_portable\ComfyUI\input\download4 (2)_kps.pth --output_path D:\ComfyUI_windows_portable\ComfyUI\output\1717485689.216709_vexpress.mp4 --image_width 512 --image_height 512 --fps 30.0 --seed 1070 --num_inference_steps 30 --guidance_scale 3.5 --context_frames 12 --context_stride 1 --context_overlap 4 --reference_attention_weight 0.95 --audio_attention_weight 3.0 A matching Triton is not available, some optimizations will not be enabled. Error caught was: No module named 'triton' D:\ComfyUI_windows_portable\python_embeded\lib\site-packages\diffusers\models\dual_transformer_2d.py:20: FutureWarning: DualTransformer2DModel is deprecated and will be removed in version 0.29. Importing DualTransformer2DModel from diffusers.models.dual_transformer_2d is deprecated and this will be removed in a future version. Please use from diffusers.models.transformers.dual_transformer_2d import DualTransformer2DModel, instead. deprecate("DualTransformer2DModel", "0.29", deprecation_message) usage: inference.py [-h] [--unet_config_path UNET_CONFIG_PATH] [--vae_path VAE_PATH] [--audio_encoder_path AUDIO_ENCODER_PATH] [--insightface_model_path INSIGHTFACE_MODEL_PATH] [--denoising_unet_path DENOISING_UNET_PATH] [--reference_net_path REFERENCE_NET_PATH] [--v_kps_guider_path V_KPS_GUIDER_PATH] [--audio_projection_path AUDIO_PROJECTION_PATH] [--motion_module_path MOTION_MODULE_PATH] [--retarget_strategy RETARGET_STRATEGY] [--device DEVICE] [--gpu_id GPU_ID] [--dtype DTYPE] [--num_pad_audio_frames NUM_PAD_AUDIO_FRAMES] [--standard_audio_sampling_rate STANDARD_AUDIO_SAMPLING_RATE] [--reference_image_path REFERENCE_IMAGE_PATH] [--audio_path AUDIO_PATH] [--kps_path KPS_PATH] [--output_path OUTPUT_PATH] [--image_width IMAGE_WIDTH] [--image_height IMAGE_HEIGHT] [--fps FPS] [--seed SEED] [--num_inference_steps NUM_INFERENCE_STEPS] [--guidance_scale GUIDANCE_SCALE] [--context_frames CONTEXT_FRAMES] [--context_stride CONTEXT_STRIDE] [--context_overlap CONTEXT_OVERLAP] [--reference_attention_weight REFERENCE_ATTENTION_WEIGHT] [--audio_attention_weight AUDIO_ATTENTION_WEIGHT] inference.py: error: unrecognized arguments: (2)_kps.pth

satangel2222 commented 4 months ago

did anybody can help me please, after i finish run one movie successful, the following wont work anymore even i restart the comfyui .

tiankuan93 commented 4 months ago

I'm guessing you're using another plugin or code repository. The workflow of this repository does not call "extract_kps_sequence_and_audio.py" explicitly. You can try using workflow provided in this repository.

satangel2222 commented 4 months ago

I'm guessing you're using another plugin or code repository. The workflow of this repository does not call "extract_kps_sequence_and_audio.py" explicitly. You can try using workflow provided in this repository.

hi, i ald use your workflow instead of bilibili author workflow,but still get error for this, do you have any idea?

Loaded weights of Reference Net from D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\v-express/reference_net.pth. Loaded weights of Denoising U-Net from D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\v-express/denoising_unet.pth. Loaded weights of Denoising U-Net Motion Module from D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\v-express/motion_module.pth. Loaded weights of V-Kps Guider from D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\v-express/v_kps_guider.pth. Loaded weights of Audio Projection from D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\v-express/audio_projection.pth. Some weights of Wav2Vec2Model were not initialized from the model checkpoint at D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\wav2vec2-base-960h and are newly initialized: ['wav2vec2.masked_spec_embed'] You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference. EP Error EP Error 'providers' and 'provider_options' should be the same length if both are given. when using ['CPUExecutionProvider'] Falling back to ['CPUExecutionProvider'] and retrying.


Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\insightface_models\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0 EP Error EP Error 'providers' and 'provider_options' should be the same length if both are given. when using ['CPUExecutionProvider'] Falling back to ['CPUExecutionProvider'] and retrying.


Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\insightface_models\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0 EP Error EP Error 'providers' and 'provider_options' should be the same length if both are given. when using ['CPUExecutionProvider'] Falling back to ['CPUExecutionProvider'] and retrying.


Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\insightface_models\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0 EP Error EP Error 'providers' and 'provider_options' should be the same length if both are given. when using ['CPUExecutionProvider'] Falling back to ['CPUExecutionProvider'] and retrying.


Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\insightface_models\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0 EP Error EP Error 'providers' and 'provider_options' should be the same length if both are given. when using ['CPUExecutionProvider'] Falling back to ['CPUExecutionProvider'] and retrying.


Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\insightface_models\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5 set det-size: (512, 512) EP Error EP Error 'providers' and 'provider_options' should be the same length if both are given. when using ['CPUExecutionProvider'] Falling back to ['CPUExecutionProvider'] and retrying.


Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\insightface_models\models\buffalo_l\1k3d68.onnx landmark_3d_68 ['None', 3, 192, 192] 0.0 1.0 EP Error EP Error 'providers' and 'provider_options' should be the same length if both are given. when using ['CPUExecutionProvider'] Falling back to ['CPUExecutionProvider'] and retrying.


Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\insightface_models\models\buffalo_l\2d106det.onnx landmark_2d_106 ['None', 3, 192, 192] 0.0 1.0 EP Error EP Error 'providers' and 'provider_options' should be the same length if both are given. when using ['CPUExecutionProvider'] Falling back to ['CPUExecutionProvider'] and retrying.


Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\insightface_models\models\buffalo_l\det_10g.onnx detection [1, 3, '?', '?'] 127.5 128.0 EP Error EP Error 'providers' and 'provider_options' should be the same length if both are given. when using ['CPUExecutionProvider'] Falling back to ['CPUExecutionProvider'] and retrying.


Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\insightface_models\models\buffalo_l\genderage.onnx genderage ['None', 3, 96, 96] 0.0 1.0 EP Error EP Error 'providers' and 'provider_options' should be the same length if both are given. when using ['CPUExecutionProvider'] Falling back to ['CPUExecutionProvider'] and retrying.


Applied providers: ['CPUExecutionProvider'], with options: {'CPUExecutionProvider': {}} find model: D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express./model_ckpts\insightface_models\models\buffalo_l\w600k_r50.onnx recognition ['None', 3, 112, 112] 127.5 127.5 set det-size: (512, 512) Length of audio is 186368 with the sampling rate of 44100. The corresponding video length is 126. The original length of kps sequence is 120. The interpolated length of kps sequence is 126. 100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [30:36<00:00, 91.80s/it] 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 126/126 [02:21<00:00, 1.13s/it] [ERROR:0@2205.287] global cap.cpp:597 cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:

OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): D:\ComfyUI_windows_portable\ComfyUI\output-temp in function 'cv::icvExtractPattern'

!!! Exception during processing!!! [WinError 2] 系统找不到指定的文件。: 'D:\ComfyUI_windows_portable\ComfyUI\output-temp' Traceback (most recent call last): File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express\nodes.py", line 281, in v_express save_video(video_tensor, audio_path, output_path, fps) File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-V-Express\src\pipelines\utils.py", line 91, in save_video os.remove(temp_output_path) FileNotFoundError: [WinError 2] 系统找不到指定的文件。: 'D:\ComfyUI_windows_portable\ComfyUI\output-temp'

i set the V-EXPRESS output path as same as my comfyui output path"D:\ComfyUI_windows_portable\ComfyUI\output"

tiankuan93 commented 4 months ago

It looks like you've run it to the last minute and got an error when saving the results as a video. It seems that your opencv is not saving the video successfully, maybe you can check the opencv version. We are using opencv-python==4.9.0.80 .

satangel2222 commented 3 months ago

Applied providers: ['CPUExecutionProvider'],

HI,tiankuan93, I found the problem is the file any time i upload, it automatic adding suffix with(0),(1) after the filename, so everytime i loading somethinng i need to choose the original file again, example, filename.mp3 will become filename(1).png, and so on.

Besides i run a 4 sec video need 3 hours on my 3070 8gb, i guess is abnormal right? wanna know is it using cpu to run? cause i saw the error msg on this

EP Error EP Error 'providers' and 'provider_options' should be the same length if both are given. when using ['CPUExecutionProvider'] Falling back to ['CPUExecutionProvider'] and retrying.

is it any fix or solution?

tiankuan93 commented 3 months ago

It looks like you have a problem with your runtime environment, using the CPU instead of the GPU to run it.

The file renaming issue is because I'm using some existing components that automatically rename files with the same name. You can try to empty the input folder before uploading, or you can try to put the file in the input folder manually and select it via the dropdown box instead of uploading it.