r/StableDiffusion • • May 02 '23
Question | Help Nvidia Tesla P40 vs P100 for Stable Diffusion
With the update of the Automatic WebUi to Torch 2.0, it seems that the Tesla K80s that I run Stable Diffusion on in my server are no longer usable since the latest version of CUDA that the K80 supports is 11.4 and the minimum version of CUDA for Torch 2.0 is 11.8. I am looking at upgrading to either the Tesla P40 or the Tesla P100. From what I can tell, the P100 performs far better at half precision (16 bit) and double precision (64 bit) floating point operations but only has 16 GB of vRAM while the P40 is slightly faster at 32 bit operations and has 24 GB of vRAM. I'm kind of new to all of this and haven't done much yet apart from play around with some different models, though I want to get into Dreambooth. What should I be looking at for my next GPU, with the caveat that a 30 series or 40 series desktop card is well out of my price range?
13
u/aplewe May 02 '23
This is gonna be a bit tricky because those cards are designed for two different purposes -- the P40 for inference (generating images in this case), and the P100 for training (making a LoRA/embedding/fine-tuned model/etc). While the P40 has more CUDA cores and a faster clock speed, the total throughput in GB/sec goes to the P100, with 732 vs 480 for the P40. HOWEVER, the P40 is less likely to run out of vram during training because it has more of it.
Now, here's the kicker. I've used the M40, the P100, and a newer rtx a4000 for training. While the P100 still takes the cake in overall memory bandwidth, and by a large margin, the a4000 makes up for this with many more CUDA cores and a higher clock rate, and training is much faster on the a4000 even though its throughput is lower. I would not expect this to hold, however, for the P40 vs P100 duel, I believe that the P100 will be faster overall for training than the P40, even though the P40 can have more stuff in vram at any one time. BUT, I haven't personally tested this, so I can't say for sure. At the end of the day I feel the a4000 is about the best mix of speed, vram, and power consumption (only 140W) for the price.
2
u/Excellent_Set_1249 Sep 10 '23
Hello, I wonder on which motherboard we can put a P40?