kijai / ComfyUI-SUPIR

SUPIR upscaling wrapper for ComfyUI
Other
1.59k stars 88 forks source link

error: input types 'tensor<2x1280xf32>' and 'tensor<1280xf16>' are not broadcast compatible #70

Open tvsj opened 8 months ago

tvsj commented 8 months ago

Device Environment macOS m2Max python3.12

image
kijai commented 8 months ago

I think on Mac you have to set the model dtype to fp32 too. This didn't work at all on MPS before, I did get it running on fp32 for someone else, but I can't really further work on that, it's an issue with the original code.

tvsj commented 8 months ago

I think on Mac you have to set the model dtype to fp32 too. This didn't work at all on MPS before, I did get it running on fp32 for someone else, but I can't really further work on that, it's an issue with the original code.

thanks.I tried to change dtype to FP32. The memory usage is too high. My device has only 32GB of memory and cannot support the program.

image

then i export PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0
The program did not report an error, but there was no progress change in this state for a long time.

image

Finally, something to celebrate happened!The progress bar is moving! A rough estimate of 9% of the progress took at least 10 minutes

KannManMachen commented 7 months ago

I can confirm that setting the "dtype" to "fp32" for these notes did the trick:

Used hardware:

Required time for upscaling/enhancing from 512 px to 1536 px: