tencent-ailab / V-Express

V-Express aims to generate a talking head video under the control of a reference image, an audio, and a sequence of V-Kps images.
2.26k stars 283 forks source link

[WinError 5] Access Denied: 'D:\\V-ExpressOutput-temp' #41

Closed WebKing2024 closed 5 months ago

WebKing2024 commented 5 months ago

我在“V-Express Sampler”节点遇到了拒绝访问错误,提示无法访问“D:\V-ExpressOutput-temp”文件夹,然后我在相应目录新建了“D:\V-ExpressOutput-temp”文件夹,问题依旧没有解决,完整的报错信息和截图如下:

I encountered an access denied error in the "V-Express Sampler" node, which said that the "D:\V-ExpressOutput-temp" folder could not be accessed. I then created a new "D:\V-ExpressOutput-temp" folder in the corresponding directory, but the issues was still not solved. The complete error message and screenshots are as follows:

The corresponding video length is 137. [ERROR:0@13898.964] 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:\V-ExpressOutput-temp in function 'cv::icvExtractPattern'

!!! Exception during processing!!! [WinError 5] 拒绝访问。: 'D:\V-ExpressOutput-temp' Traceback (most recent call last): File "E:\ComfyUI-aki-v1.2\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "E:\ComfyUI-aki-v1.2\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "E:\ComfyUI-aki-v1.2\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "E:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-V-Express\nodes.py", line 292, in v_express save_video(video_tensor, audio_path, output_path, fps) File "E:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-V-Express\src\pipelines\utils.py", line 91, in save_video os.remove(temp_output_path) PermissionError: [WinError 5] 拒绝访问。: 'D:\V-ExpressOutput-temp'

tiankuan93 commented 5 months ago

可能是你没有用管理员权限打开comfyui,所以才会没有权限删除文件夹。你试试用管理员权限运行comfyui。

WebKing2024 commented 5 months ago

感谢您的反馈,我用的是秋叶整合包,用管理员权限启动后,依然报这个错误,以下是新的报错信息:

!!! Exception during processing!!! [WinError 5] 拒绝访问。: 'E:\ComfyUI-aki-v1.2\output-temp' Traceback (most recent call last): File "E:\ComfyUI-aki-v1.2\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "E:\ComfyUI-aki-v1.2\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "E:\ComfyUI-aki-v1.2\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "E:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-V-Express\nodes.py", line 292, in v_express save_video(video_tensor, audio_path, output_path, fps) File "E:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-V-Express\src\pipelines\utils.py", line 91, in save_video os.remove(temp_output_path) PermissionError: [WinError 5] 拒绝访问。: 'E:\ComfyUI-aki-v1.2\output-temp'

备注:我明天试试用原生ComfyUI更新包是否会出现这个问题。

tiankuan93 commented 5 months ago

或者你可以把对应的这一行代码注释掉,这一行原本是为了删掉生成过程的中间结果,不删也是可以的。 E:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-V-Express\src\pipelines\utils.py
91行
os.remove(temp_output_path) -> # os.remove(temp_output_path)

WebKing2024 commented 5 months ago

或者你可以把对应的这一行代码注释掉,这一行原本是为了删掉生成过程的中间结果,不删也是可以的。 E:\ComfyUI-aki-v1.2\custom_nodes\ComfyUI-V-Express\src\pipelines\utils.py 91行 os.remove(temp_output_path) -> # os.remove(temp_output_path)

我注释掉这行代码,节点可以顺利通过并执行完毕,但视频预览下方的控件显示异常,点击无法播放视频,我又查看了未删除的output_temp目录和output目录下均没有任何视频文件,还有哪些可能会导致这个问题呢?

注释掉临时文件夹删除

WebKing2024 commented 5 months ago

我刚注意到更新日志: [2024/06/15] 🔥 We have optimized memory usage, now supporting the generation of longer videos. 我记得下载的这个代码压缩包是15日之前的版本,我刚更新了最新代码,明天再执行一遍工作流查看最新结果。

WebKing2024 commented 5 months ago

没想到代码执行的如此之快,我得到了结果,并且我对比原代码,发现是更改了output_path参数时,没有输入文件名引起的异常。感谢开发团队的开源分享! 最新结果

I didn't expect the code to execute so quickly. I got the result and compared it with the original code. I found that the exception was caused by not inputting the file name when the output_path parameter was changed. Thanks to the development team for sharing the open source!

WebKing2024 commented 5 months ago

是的,我将关闭这个问题,希望对后来者有所帮助。 Yes, I will close this question in the hope that it helps someone who comes later.