You could have government-signed models + programs that are approved for generating CP (not CSAM). It's legal if the signature checks out. Something like https://contentauthenticity.org/ but for verifying that something is definitely made by AI.
(You need to sign both the models and the programs to make sure there's no img2img.)
(You need to sign both the models and the programs to make sure there's no img2img.)