PowerPaint icon indicating copy to clipboard operation
PowerPaint copied to clipboard

Support replacing cuda with cpu

Open whittaker007 opened this issue 1 year ago • 1 comments

Almost got this running on Apple Silicon but it fails with multiple references to cuda which is unsupported on Apple GPUs.

PyTorch is capable of running on CPU and I've made a few amateur replacements but lack the experience to know quite what I'm doing.

There's only around a dozen or so references to "cuda" in the code, so it seems like it maybe wouldn't take that much to get it to run on the cpu instead of gpu.

Of course I'm not suggesting that it should use cpu by default, but it should be easy enough to do some detection, or use an environment variable to switch - or at minumum some code comments highlighting what should be manually changed by an end user.

whittaker007 avatar Oct 11 '24 22:10 whittaker007

OK just noting that I did manage to get it running, but it was increadibly slow to process, used 100% of the CPU for several minutes, and failed to produce output.

Ah well, maybe should have expected this!

whittaker007 avatar Oct 11 '24 22:10 whittaker007

hi @whittaker007 We don't expect using CPU for running large diffusion models. It's too slowly and we didn't test the performance on CPU.

zengyh1900 avatar Oct 16 '24 08:10 zengyh1900