StreamDiffusion icon indicating copy to clipboard operation
StreamDiffusion copied to clipboard

Support Metal Performance Shaders

Open Tps-F opened this issue 1 year ago • 7 comments

To be able to work with mps devices mpsデバイスで動作ができるように

check status

  • [x] benchmark
  • [x] img2img
  • [x] txt2img
  • [x] vid2vid

Tps-F avatar Feb 17 '24 13:02 Tps-F

Benchmark results on m1 macbook air

Average time: 4233.89050291ms
Average FPS: 0.23618938640777057
Max FPS: 0.2696536167593899
Min FPS: 0.16658852853947326
Std: 0.023981565291716123

Tps-F avatar Feb 17 '24 14:02 Tps-F

Should I make the demo work on mps too?

Tps-F avatar Feb 18 '24 05:02 Tps-F

Hey @Tps-F, I'm interesting by your pr. Could you explain how to install and use it on mps ?

Hugofgx9 avatar Mar 03 '24 15:03 Hugofgx9

@Tps-F Hi, sorry for the late reply. The implementation for mps devices looks very interesting! We're quite busy this week and cannot review your code at the moment, but I'll make sure to review your pull request (PR) next week. Thank you so much!

cumulo-autumn avatar Mar 04 '24 05:03 cumulo-autumn

@Hugofgx9 Thanks for your interest!

xformer doesn't support mps, so don't install it, just follow the instructions in the readme. To install pytorch, choose the one that fits your environment from here https://pytorch.org/

I'll add a more detailed guide to the PR later.

Tps-F avatar Mar 04 '24 05:03 Tps-F

@cumulo-autumn Thank you for stopping by and taking time out of your busy schedule! I may make a few more changes, so I'll have it done by next week.

Tps-F avatar Mar 04 '24 06:03 Tps-F

@Tps-F Thanks for your work and explanations

Hugofgx9 avatar Mar 04 '24 07:03 Hugofgx9