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

does it work on Mac? #129

Open
szrobinw opened this issue Jan 4, 2025 · 8 comments
Open

does it work on Mac? #129

szrobinw opened this issue Jan 4, 2025 · 8 comments

Comments

@szrobinw
Copy link

szrobinw commented Jan 4, 2025

hi,

Mac seems not work? anyone can help?

Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.

@smthemex
Copy link
Owner

smthemex commented Jan 4, 2025

I haven't tested whether it can run on MAC yet. You can try running it once and post an error message. I'll check if I can modify the code to be compatible with MAC

@szrobinw
Copy link
Author

szrobinw commented Jan 5, 2025

I haven't tested whether it can run on MAC yet. You can try running it once and post an error message. I'll check if I can modify the code to be compatible with MAC

please have the error as below, thanks.

ComfyUI Error Report

Error Details

  • Node ID: 1
  • Node Type: Echo_LoadModel
  • Exception Type: RuntimeError
  • Exception Message: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.

Stack Trace

  File "/Users/rw/ComfyUI/execution.py", line 327, 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 "/Users/rw/ComfyUI/execution.py", line 202, 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 "/Users/rw/ComfyUI/execution.py", line 174, in _map_node_over_list
    process_inputs(input_dict, i)

  File "/Users/rw/ComfyUI/execution.py", line 163, in process_inputs
    results.append(getattr(obj, func)(**inputs))

  File "/Users/rw/ComfyUI/custom_nodes/ComfyUI_EchoMimic/EchoMimic_node.py", line 298, in main_loader
    pose_state = torch.load(pose_encoder_pt)

  File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/ultralytics/utils/patches.py", line 86, in torch_load
    return _torch_load(*args, **kwargs)

  File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 1368, in load
    return _load(

  File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 1856, in _load
    result = unpickler.load()

  File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 1820, in persistent_load
    typed_storage = load_tensor(

  File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 1792, in load_tensor
    wrap_storage=restore_location(storage, location),

  File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 601, in default_restore_location
    result = fn(storage, location)

  File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 539, in _deserialize
    device = _validate_device(location, backend_name)

  File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 508, in _validate_device
    raise RuntimeError(

System Information

  • ComfyUI Version: v0.3.10-21-g0f11d60
  • Arguments: main.py
  • OS: posix
  • Python Version: 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:26:08) [Clang 14.0.6 ]
  • Embedded Python: false
  • PyTorch Version: 2.5.1.post7

Devices

  • Name: mps
    • Type: mps
    • VRAM Total: 17179869184
    • VRAM Free: 9642999808
    • Torch VRAM Total: 17179869184
    • Torch VRAM Free: 9642999808

Logs

@smthemex
Copy link
Owner

smthemex commented Jan 5, 2025

yeah, i will fix it ,and when update the new version, you can try again.

@szrobinw
Copy link
Author

szrobinw commented Jan 8, 2025

thanks, waiting for new version...
may I know when it'll be updated.....

@smthemex
Copy link
Owner

smthemex commented Jan 8, 2025

I don't have a MAC to test this node, so you need to try it out. I will try to match the MAC based on the error message

@szrobinw
Copy link
Author

szrobinw commented Jan 8, 2025

I don't have a MAC to test this node, so you need to try it out. I will try to match the MAC based on the error message

run error as below with Macos M1

Starting server

To see the GUI go to: http://127.0.0.1:8188
FETCH DATA from: /Users/rw/ComfyUI/custom_nodes/ComfyUI-Manager/extension-node-map.json [DONE]
FETCH DATA from: /Users/rw/ComfyUI/custom_nodes/ComfyUI-Manager/extension-node-map.json [DONE]
got prompt
****** refer in EchoMimic V1 mode!******
/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/diffusers/configuration_utils.py:245: FutureWarning: It is deprecated to pass a pretrained model name or path to from_config.If you were trying to load a model, please use <class 'ComfyUI_EchoMimic.src.models.unet_2d_condition.UNet2DConditionModel'>.load_config(...) followed by <class 'ComfyUI_EchoMimic.src.models.unet_2d_condition.UNet2DConditionModel'>.from_config(...) instead. Otherwise, please make sure to pass a configuration dictionary instead. This functionality will be removed in v1.0.0.
deprecate("config-passed-as-path", "1.0.0", deprecation_message, standard_warn=False)
/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/diffusers/models/lora.py:306: FutureWarning: LoRACompatibleConv is deprecated and will be removed in version 1.0.0. Use of LoRACompatibleConv is deprecated. Please switch to PEFT backend by installing PEFT: pip install peft.
deprecate("LoRACompatibleConv", "1.0.0", deprecation_message)
loaded temporal unet's pretrained weights from /Users/rw/ComfyUI/models/echo_mimic/unet ...
Load motion module params from /Users/rw/ComfyUI/models/echo_mimic/motion_module.pth
Loaded 453.20928M-parameter motion module
!!! Exception during processing !!! Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
Traceback (most recent call last):
File "/Users/rw/ComfyUI/execution.py", line 327, 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 "/Users/rw/ComfyUI/execution.py", line 202, 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 "/Users/rw/ComfyUI/execution.py", line 174, in _map_node_over_list
process_inputs(input_dict, i)
File "/Users/rw/ComfyUI/execution.py", line 163, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "/Users/rw/ComfyUI/custom_nodes/ComfyUI_EchoMimic/EchoMimic_node.py", line 292, in main_loader
face_locator.load_state_dict(torch.load(face_locator_pt), strict=False)
File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/ultralytics/utils/patches.py", line 86, in torch_load
return _torch_load(*args, **kwargs)
File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 1360, in load
return _load(
File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 1848, in _load
result = unpickler.load()
File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 1812, in persistent_load
typed_storage = load_tensor(
File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 1784, in load_tensor
wrap_storage=restore_location(storage, location),
File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 601, in default_restore_location
result = fn(storage, location)
File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 539, in _deserialize
device = _validate_device(location, backend_name)
File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/serialization.py", line 508, in _validate_device
raise RuntimeError(
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.

Prompt executed in 22.62 seconds

@szrobinw
Copy link
Author

szrobinw commented Jan 8, 2025

run with V2,error is as below;

ComfyUI Error Report

Error Details

  • Node ID: 19
  • Node Type: Echo_Sampler
  • Exception Type: AssertionError
  • Exception Message: Torch not compiled with CUDA enabled

Stack Trace

  File "/Users/rw/ComfyUI/execution.py", line 327, 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 "/Users/rw/ComfyUI/execution.py", line 202, 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 "/Users/rw/ComfyUI/execution.py", line 174, in _map_node_over_list
    process_inputs(input_dict, i)

  File "/Users/rw/ComfyUI/execution.py", line 163, in process_inputs
    results.append(getattr(obj, func)(**inputs))

  File "/Users/rw/ComfyUI/custom_nodes/ComfyUI_EchoMimic/EchoMimic_node.py", line 481, in em_main
    output_video=process_video_v2(image, audio_file, width, height, length, seed,

  File "/Users/rw/ComfyUI/custom_nodes/ComfyUI_EchoMimic/utils.py", line 242, in process_video_v2
    video = pipe(

  File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)

  File "/Users/rw/ComfyUI/custom_nodes/ComfyUI_EchoMimic/echomimic_v2/src/pipelines/pipeline_echomimicv2.py", line 451, in __call__
    reference_control_writer = ReferenceAttentionControl(

  File "/Users/rw/ComfyUI/custom_nodes/ComfyUI_EchoMimic/echomimic_v2/src/models/mutual_self_attention.py", line 40, in __init__
    self.register_reference_hooks(

  File "/Users/rw/ComfyUI/custom_nodes/ComfyUI_EchoMimic/echomimic_v2/src/models/mutual_self_attention.py", line 83, in register_reference_hooks
    .to(device)

  File "/opt/anaconda3/envs/comfyenv/lib/python3.10/site-packages/torch/cuda/__init__.py", line 310, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")

System Information

  • ComfyUI Version: v0.3.10-21-g0f11d60
  • Arguments: main.py
  • OS: posix
  • Python Version: 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:26:08) [Clang 14.0.6 ]
  • Embedded Python: false
  • PyTorch Version: 2.5.1

Devices

  • Name: mps
    • Type: mps
    • VRAM Total: 17179869184
    • VRAM Free: 6020710400
    • Torch VRAM Total: 17179869184
    • Torch VRAM Free: 6020710400

@smthemex
Copy link
Owner

smthemex commented Jan 8, 2025

I will try to modify the code based on the issue you provided, but I cannot guarantee that it will run

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