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

Error occurred when executing ExtractOpticalFlow: #1

Closed
Cedri4 opened this issue Oct 28, 2023 · 5 comments
Closed

Error occurred when executing ExtractOpticalFlow: #1

Cedri4 opened this issue Oct 28, 2023 · 5 comments

Comments

@Cedri4
Copy link

Cedri4 commented Oct 28, 2023

I got this on the ComfyUI:
Error occurred when executing ExtractOpticalFlow:

The feature encoder should downsample H and W by 8

File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyWarp\warp_nodes.py", line 28, in get_flow
flow, flow_imgs, edge_mask, occlusion_mask, border_mask = get_flow_and_mask(previous_frame, current_frame, num_flow_updates=20, raft_model=self.raft_model, edge_width=11, dilation=2)
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyWarp\flow_utils.py", line 233, in get_flow_and_mask
flow21 = raft_model(frame2.half(), frame1.half(), num_flow_updates=num_flow_updates)[-1] #flow_bwd
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\python_embeded\lib\site-packages\torchvision\models\optical_flow\raft.py", line 482, in forward
raise ValueError("The feature encoder should downsample H and W by 8")

And this on the terminal:

ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyWarp\warp_nodes.py", line 28, in get_flow
flow, flow_imgs, edge_mask, occlusion_mask, border_mask = get_flow_and_mask(previous_frame, current_frame, num_flow_updates=20, raft_model=self.raft_model, edge_width=11, dilation=2)
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyWarp\flow_utils.py", line 233, in get_flow_and_mask
flow21 = raft_model(frame2.half(), frame1.half(), num_flow_updates=num_flow_updates)[-1] #flow_bwd
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\python_embeded\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "F:\Stable-Diffusion\ComfyUI\ComfyUI_windows_portable\python_embeded\lib\site-packages\torchvision\models\optical_flow\raft.py", line 482, in forward
raise ValueError("The feature encoder should downsample H and W by 8")
ValueError: The feature encoder should downsample H and W by 8

Here is the part that has a problem:

image
I must have put something wrong but I don't know what.
And the fix is probably already out for the patron members but I ain't one.

@Sxela
Copy link
Owner

Sxela commented Nov 3, 2023

You need to add a built-in resize node to resize frames to a divisible by 8 resolution

@Cedri4
Copy link
Author

Cedri4 commented Nov 3, 2023

image
Like that?

@Cedri4
Copy link
Author

Cedri4 commented Nov 3, 2023

I figure it out now I have the same issue with #2
Here is the terminal output
image

@Sxela
Copy link
Owner

Sxela commented Nov 4, 2023

Should be fixed in https://github.com/Sxela/ComfyWarp/releases/tag/v0.2.0

@Cedri4
Copy link
Author

Cedri4 commented Nov 4, 2023

Thanks for the update works well. I am gonna close this issue.

@Cedri4 Cedri4 closed this as completed Nov 4, 2023
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

2 participants