If you have a machine and suddenly realize you can run LLMs on it, yes.
If you're buying a machine specifically so it's capable of running LLMs for you, then the purchase cost is your up-front payment for the inference you'll run.
And between that and electricity costs, cloud has you beat.