One of St. Thomas’ proofs of the infinity of God is this:
Again, an effect cannot transcend its cause. But our intellect can only be from God, Who is the first cause of all things. Our intellect cannot think of anything greater than God. If, then, it can think of something greater than every finite being, it remains that God is not finite.” (SCG, I, 43, )
The sense of infinitude he is promoting here is “spiritual greatness,” meaning either completeness of nature and ad intra happiness or ad extra omnipotence.
This is very similar to Descartes’ arguments in Meditations on First Philosophy, e.g.,
It is true that I have the idea of substance in me in virtue of the fact that I am a substance;
but this would not account for my having the idea of an infinite substance, when I am finite, unless this idea proceeded from some substance which really was infinite.
It might seem that the difference is that Descartes wants to prove God’s existence (the idea of God is “the mark of the craftsman stamped on his work”), while St. Thomas is only concerned with His infinity.
But since proving God’s existence is identical to demonstrating which attributes are co-instantiated in the same being, both philosophers are doing essentially the same thing.