cubiq / PuLID_ComfyUI

PuLID native implementation for ComfyUI
Apache License 2.0
700 stars 42 forks source link

Error on MacOS M2 #54

Closed lisiyizu closed 4 months ago

lisiyizu commented 4 months ago

The operator 'aten::_upsample_bilinear2d_aa.out' is not currently implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on https://github.com/pytorch/pytorch/issues/77764. As a temporary fix, you can set the environment variable PYTORCH_ENABLE_MPS_FALLBACK=1 to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS.

  File "/Users/kummy/Documents/work/ComfyUI/execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "/Users/kummy/Documents/work/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 "/Users/kummy/Documents/work/ComfyUI/execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "/Users/kummy/Documents/work/ComfyUI/custom_nodes/PuLID_ComfyUI/pulid.py", line 376, in apply_pulid
    face_features_image = T.functional.resize(face_features_image, eva_clip.image_size, T.InterpolationMode.BICUBIC if 'cuda' in device.type else T.InterpolationMode.BILINEAR).to(device, dtype=dtype)
  File "/Users/kummy/miniconda3/envs/comflowy/lib/python3.10/site-packages/torchvision/transforms/functional.py", line 479, in resize
    return F_t.resize(img, size=output_size, interpolation=interpolation.value, antialias=antialias)
  File "/Users/kummy/miniconda3/envs/comflowy/lib/python3.10/site-packages/torchvision/transforms/_functional_tensor.py", line 465, in resize
    img = interpolate(img, size=size, mode=interpolation, align_corners=align_corners, antialias=antialias)
  File "/Users/kummy/miniconda3/envs/comflowy/lib/python3.10/site-packages/torch/nn/functional.py", line 4565, in interpolate
    return torch._C._nn._upsample_bilinear2d_aa(

Does this mean this extension can't be used on MacOS?

image
cubiq commented 4 months ago

should be fixed

lisiyizu commented 4 months ago

thanks for you help, fix it