If this is detected as leading to copyright violation, then that can be the subject of a lawsuit.
Since the violation is detected via model output, it doesn't matter what the input method is.