cpu support for txt2img and img2img
Hello,
I made this PR because this fix makes it possible to run txt2img and img2img on the CPU. It takes some time using the CPU, for sure, but it works. In the code, it is sometimes assumed that cuda is available and other times it isn't assumed. Since it isn't consistent, I figured this change might be interesting for you upstream.
Thanks!
ring
Is there a way to force using the CPU even if the GPU is available? I've a few memory consumption changes I've made, but have been looking for a way to run img2img, but my memory changes don't work there.
Is there a way to force using the CPU even if the GPU is available? I've a few memory consumption changes I've made, but have been looking for a way to run img2img, but my memory changes don't work there.
Check the code, it has to do with a string specifying the device. If it is set to "cuda" that means it is using the gpu. One can fork, then set it to "cpu" everywhere regardless. There is no command line argument available that forces setting it to cpu unfortunately. But with this fork of mine, one can run it on cpu if there is no gpu available. Fork my fork, then write "cpu" everywhere then you are good :)