Fake nudes of real people are generally illegal, regardless of if the nude is real, or photoshopped, or AI generated.
People have been arrested and convicted for AI porn of real people.
For now convictions seem to be confined to people who have already created/used more traditional CSAM (hidden cameras). This could just be because it is hard to catch someone simply generating images, so if someone with no record would be jailed for just fake nudes remains an open question. Fake nudes of fictional people are also very much an open question. Being very new technology, new laws have yet to be made, so feel free to write to lawmakers about where the line should be.
Just add a delay that pads it out the execute time to 10 seconds. O(1) ez.