Skip to content

Issue with 64float dtype on apple silicon #38

@ajfisher

Description

@ajfisher

Trying to do a very simple workflow using the sampler and am running into an issue on a MacBook Pro M3.

Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

I've tried doing things like setting the MPS fallback env variable to go back to CPU etc but that doesn't seem to resolve it. I've also tried selecting the fp64, fp32 and bf16 dtypes in the Load INVSR models node but none seems to help.

Stacktrace suggests this as the likely candidate:

File "/Users/xxxxxx/dev/ComfyUI/custom_nodes/ComfyUI_InvSR/comfyui_invsr_trimmed/utils/util_image.py", line 781, in __init__
    self.im_res = torch.zeros([bs, chn, height*sf, width*sf], dtype=self.dtype, device=im.device)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead

Am not sure how to force the switching of that or try out some other options to see the best way to resolve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions