Well there was that legal company who trained an LLM on their oppositions legal documents and then generated their own. I dont think inputs or outputs were ruled legal in that regard.
But as long as the model isnt outputting infringing works theres not really any issue there either.