> Whereas the art is was trained on is, broadly speaking, copywritten
The overwhelmingly vast majority of the code you're talking about (basically, anything that doesn't explicitly disavow its copyright by being placed in the public domain, and there's some legal debate if that is even something that you can do proactively) is just as copyright protected as the art is.
Open Source does not mean copyright free.
"Free Software" certainly doesn't mean copyright free (the GPL only has any meaning at all because of copyright law).
> there's some legal debate if that is even something that you can do proactively
Public Domain in the US is the only factor that truly matters on the Internet today, but people who care do both.
Release into the Public Domain and provide a 0-type license.