daniabib / ComfyUI_ProPainter_Nodes

🖌️ ComfyUI implementation of ProPainter framework for video inpainting.
GNU General Public License v3.0
161 stars 6 forks source link

Allocation on device #3

Closed Copylefter closed 17 hours ago

Copylefter commented 2 weeks ago

I got this error

Error occurred when executing ProPainterInpaint:

Allocation on device

File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\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 "C:\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 "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_ProPainter_Nodes\propainter_nodes.py", line 136, in propainter_inpainting
updated_frames, updated_masks, pred_flows_bi = process_inpainting(
^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_ProPainter_Nodes\propainter_inference.py", line 323, in process_inpainting
gt_flows_bi = compute_flow(models.raft_model, frames, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_ProPainter_Nodes\propainter_inference.py", line 80, in compute_flow
flows_f, flows_b = raft_model(
^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_ProPainter_Nodes\model\modules\flow_comp_raft.py", line 48, in forward
_, gt_flows_forward = self.fix_raft(
^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_ProPainter_Nodes\model\modules\RAFT\raft.py", line 115, in forward
corr_fn = CorrBlock(fmap1, fmap2, radius=self.args.corr_radius)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_ProPainter_Nodes\model\modules\RAFT\corr.py", line 19, in __init__
corr = CorrBlock.corr(fmap1, fmap2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_ProPainter_Nodes\model\modules\RAFT\corr.py", line 58, in corr
corr = torch.matmul(fmap1.transpose(1, 2), fmap2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
daniabib commented 2 weeks ago

Hi! It seems like you don't have enough VRAM for inference. Try to lower the resolution and make sure you are using fp16.

There is a topic on memory consumption in the original repo if you want to take a look: https://github.com/sczhou/ProPainter?tab=readme-ov-file#-memory-efficient-inference