You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run the inpainting task via CLI using --mode mask and the --src_mask argument, but the mask image or video is not being correctly loaded, and the process fails with the following error:
pgsql
AttributeError: 'NoneType' object has no attribute 'shape'
Here is what I have tested so far:
Here is what I have tested so far:
1.PNG mask file
I verified that the image loads correctly with cv2.imread(), and the file path is valid. However, when passed through the CLI, it results in the above error.
2.MP4 video mask (same resolution and frame count as source video)
Successfully loaded via OpenCV (cv2.VideoCapture()), and frame.shape is valid. Still, CLI execution raises the same error.
3.Image sequence (directory of PNGs)
I tried using a directory of sequentially named PNGs (e.g., mask_0001.png, mask_0002.png, etc.), but it also fails, possibly unsupported.
4.Using --mode bbox works perfectly, so the base configuration is functional.
Additionally, I noticed that when using the Gradio demo, it generates src_mask.mp4 as part of the internal process. I tried reusing this file as --src_mask in the CLI, but it still fails with the same error, suggesting CLI and Gradio might be using different logic for loading masks.
My questions:
*What file formats are officially supported for --src_mask when using --mode mask in CLI?
*Is video mask input (.mp4) supported yet, or is it planned?
*Are there any filename/path conventions required for correct mask loading?
*If currently not supported, is --mode mask with external masks only designed for the Gradio interface?
I'd really appreciate any guidance or clarification. I’m happy to provide logs, sample mask files, or any other information that may help.
Thank you again for this amazing tool.
Best regards,
Takafire2222
The text was updated successfully, but these errors were encountered:
Can you run the preprocessing code using sample data? I assume you need to distinguish between the preprocessing script (--video or --image) and the model inference (--src_video or --src_mask) or pipeline (preprocessing -> inference) sections of the code. Please refer to the UserGuide for more details.
Thank you very much for your kind response and clear guidance.
As you pointed out, I now understand that --src_mask in vace_pipeline.py supports only a single image mask, and that for using a video mask, I need to use vace_wan_inference.py with --src_video and --src_mask.
Following your advice, I successfully generated a mask using vace_preproccess.py, and also experimented with creating a custom mask using After Effects. With both approaches, I was able to run inference via vace_wan_inference.py and achieve the desired inpainting results.
This helped me better understand how mask resolution, format, and prompt dynamics influence the output. It was a very productive learning experience.
Thank you again for your helpful support and for developing such a powerful framework.
Best regards,
Takafire2222
jiangzeyinzi
changed the title
--src_mask not working with --task inpainting --mode mask (AttributeError: 'NoneType' object has no attribute 'shape')
How to perform an inpainting task?
Apr 3, 2025
Hello, thank you for the great work on VACE.
I am trying to run the inpainting task via CLI using --mode mask and the --src_mask argument, but the mask image or video is not being correctly loaded, and the process fails with the following error:
pgsql
AttributeError: 'NoneType' object has no attribute 'shape'
Here is what I have tested so far:
Here is what I have tested so far:
1.PNG mask file
I verified that the image loads correctly with cv2.imread(), and the file path is valid. However, when passed through the CLI, it results in the above error.
2.MP4 video mask (same resolution and frame count as source video)
Successfully loaded via OpenCV (cv2.VideoCapture()), and frame.shape is valid. Still, CLI execution raises the same error.
3.Image sequence (directory of PNGs)
I tried using a directory of sequentially named PNGs (e.g., mask_0001.png, mask_0002.png, etc.), but it also fails, possibly unsupported.
4.Using --mode bbox works perfectly, so the base configuration is functional.
Additionally, I noticed that when using the Gradio demo, it generates src_mask.mp4 as part of the internal process. I tried reusing this file as --src_mask in the CLI, but it still fails with the same error, suggesting CLI and Gradio might be using different logic for loading masks.
My questions:
*What file formats are officially supported for --src_mask when using --mode mask in CLI?
*Is video mask input (.mp4) supported yet, or is it planned?
*Are there any filename/path conventions required for correct mask loading?
*If currently not supported, is --mode mask with external masks only designed for the Gradio interface?
I'd really appreciate any guidance or clarification. I’m happy to provide logs, sample mask files, or any other information that may help.
Thank you again for this amazing tool.
Best regards,
Takafire2222
The text was updated successfully, but these errors were encountered: