nerdyrodent / VQGAN-CLIP

Just playing with getting VQGAN+CLIP running locally, rather than having to use colab.
Other
2.6k stars 428 forks source link

Fix CPU fallback, add cuda device argument and add AMD graphics card instructions #34

Closed microraptor closed 3 years ago

microraptor commented 3 years ago

Although line 381 had this: device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu'), devices without a connected CUDA graphics card would fail in line 49, because of get_device_properties. This PR fixes that and adds a warning, if the CPU fallback occurs. It also adds a cuda_device argument, so the use of the CPU or other graphics card can be forced.

I also slightly improved the set up instructions in the readme and added a section for using an AMD graphics card. However, I actually don't have a supported AMD graphics card and haven't tested this yet.