Getty Images is suing Stability AI for exactly this reason:
https://www.theverge.com/2023/2/6/23587393/ai-art-copyright-...
Getty Images will win.