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

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

Open
tvsj opened this issue Mar 18, 2024 · 3 comments

Comments

@tvsj
Copy link

tvsj commented Mar 18, 2024

Device Environment
macOS m2Max
python3.12

image
@kijai
Copy link
Owner

kijai commented Mar 18, 2024

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
Copy link
Author

tvsj commented Mar 18, 2024

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
Copy link

KannManMachen commented Apr 8, 2024

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

  • SUPIR Model Loader (v2)
  • SUPIR First Stage (Denoiser)
  • SUPIR Encode

Used hardware:

  • Apple M2 Max
  • 12x CPU / 38x GPU
  • 64 GB RAM

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

  • first run: 180 seconds
  • second run: 140 seconds

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

3 participants