kijai / ComfyUI-SUPIR

SUPIR upscaling wrapper for ComfyUI
Other
1.49k stars 82 forks source link

"Error occurred when executing SUPIR_first_stage" on MPS M2, please help #84

Open danch99 opened 6 months ago

danch99 commented 6 months ago

Hi,

I'm on MPS M2, and I'm getting this error:

Error occurred when executing SUPIR_first_stage:

No operator found for `memory_efficient_attention_forward` with inputs:
query : shape=(1, 3136, 1, 512) (torch.float32)
key : shape=(1, 3136, 1, 512) (torch.float32)
value : shape=(1, 3136, 1, 512) (torch.float32)
attn_bias :
p : 0.0
`ck_decoderF` is not supported because:
max(query.shape[-1] != value.shape[-1]) > 256
device=mps (supported: {'cuda'})
operator wasn't built - see `python -m xformers.info` for more info
`ckF` is not supported because:
max(query.shape[-1] != value.shape[-1]) > 256
device=mps (supported: {'cuda'})
dtype=torch.float32 (supported: {torch.float16, torch.bfloat16})
operator wasn't built - see `python -m xformers.info` for more info

Can you please tell me what's going wrong and how to fix it.

Thanks

kijai commented 6 months ago

I don't think xformers works on MPS, but you seem to have it installed? Would try removing it first.

danch99 commented 6 months ago

You are right. I removed it and now it works. But it crashes on my machine. It looks like it uses a LOT of memory... I did succeed to render one image and then it crashed again when I tried a second one.