smthemex / ComfyUI_EchoMimic

You can using EchoMimic in ComfyUI
Apache License 2.0
259 stars 31 forks source link

Error occurred when executing Echo_LoadModel: #48

Closed medalawi closed 2 months ago

medalawi commented 2 months ago

Could you please help me to load model without getting this memory error

Error occurred when executing Echo_LoadModel:

CUDA out of memory. Tried to allocate 58.00 MiB. GPU 0 has a total capacity of 3.95 GiB of which 54.88 MiB is free. Including non-PyTorch memory, this process has 3.89 GiB memory in use. Of the allocated memory 3.68 GiB is allocated by PyTorch, and 128.03 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation.  See documentation for Memory Management  (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)

  File "/home/ubuntu/Downloads/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 "/home/ubuntu/Downloads/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 "/home/ubuntu/Downloads/ComfyUI/execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "/home/ubuntu/Downloads/ComfyUI/execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/Downloads/ComfyUI/custom_nodes/ComfyUI_EchoMimic/EchoMimic_node.py", line 619, in main_loader
    pipe.to(device)
  File "/home/ubuntu/anaconda3/envs/comfyui/lib/python3.12/site-packages/diffusers/pipelines/pipeline_utils.py", line 431, in to
    module.to(device, dtype)
  File "/home/ubuntu/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1152, in to
    return self._apply(convert)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/nn/modules/module.py", line 802, in _apply
    module._apply(fn)
  File "/home/ubuntu/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/nn/modules/module.py", line 802, in _apply
    module._apply(fn)
  File "/home/ubuntu/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/nn/modules/module.py", line 802, in _apply
    module._apply(fn)
  [Previous line repeated 2 more times]
  File "/home/ubuntu/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/nn/modules/module.py", line 825, in _apply
    param_applied = fn(param)
                    ^^^^^^^^^
  File "/home/ubuntu/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1150, in convert
    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
smthemex commented 2 months ago

CUDA out of memory. need more VRAM, or you can turn on " lowvram" switch.

medalawi commented 2 months ago

Thank you I didn't realized low VRAM tick until yesterday I came here today to close the issue before your reply and to thank you for making it work with low VRAM 👏