kijai / ComfyUI-CogVideoXWrapper

896 stars 57 forks source link

6gb GPU throws error at CogvideoX_Fun_Pose 5b GGUF, but I2V workflow works. #145

Open CodeMichaelD opened 1 month ago

CodeMichaelD commented 1 month ago

Changing resolution, VAE tiling and input video node didn't change anything..

Closest bucket size: 672x384
!!! Exception during processing !!! Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device.
Traceback (most recent call last):
  File "C:\Users\codem\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\execution.py", line 317, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\codem\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\execution.py", line 192, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\codem\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "C:\Users\codem\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\codem\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\ComfyUI\custom_nodes\ComfyUI-CogVideoXWrapper\nodes.py", line 1325, in encode
    vae.to(offload_device)
  File "C:\Users\codem\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1174, in to
    return self._apply(convert)
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\codem\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 780, in _apply
    module._apply(fn)
  File "C:\Users\codem\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 780, in _apply
    module._apply(fn)
  File "C:\Users\codem\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 780, in _apply
    module._apply(fn)
  File "C:\Users\codem\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 805, in _apply
    param_applied = fn(param)
                    ^^^^^^^^^
  File "C:\Users\codem\Downloads\ComfyUI_Windows_portable_cu121\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1167, in convert
    raise NotImplementedError(
NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device.

Prompt executed in 344.54 seconds

Trying to use p106-100 (GTX 1060 6gb) in a cluster, also is there a chance of 2b GGUF support being implemented?

kijai commented 1 month ago

Looks like something wrong with the VAE model file itself.

CodeMichaelD commented 1 month ago

Looks like something wrong with the VAE model file itself.

https://github.com/kijai/ComfyUI-CogVideoXWrapper/issues/82#issuecomment-2365224495 - seems really similar to my case though: raise NotImplementedError( NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device. I also re downloaded models\cogvideox\vae to make sure that the issue is not with the model itself. Should I try full clean install (comfy+pytorch+cogvideox only)?

kijai commented 1 month ago

Looks like something wrong with the VAE model file itself.

https://github.com/kijai/ComfyUI-CogVideoXWrapper/issues/82#issuecomment-2365224495 - seems really similar to my case though: raise NotImplementedError( NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to() when moving module from meta to a different device. I also re downloaded models\cogvideox\vae to make sure that the issue is not with the model itself. Should I try full clean install (comfy+pytorch+cogvideox only)?

Their issue was using model loader from different node pack, what workflow are you using?

CodeMichaelD commented 1 month ago

cogvideox_fun_pose_example_01. - this one. sorry for the confusion, aren't VAE models all the same across? ex - https://huggingface.co/Kijai/CogVideoX-Fun-pruned/tree/main/CogVideoX-Fun-5b-InP/vae or https://huggingface.co/alibaba-pai/CogVideoX-Fun-5b-InP/tree/main/vae Perhaps I indeed should let Down(Load model) node source all the models..