That depends. Are you doing this just for your own enjoyment or trying to use that art for commercial purposes? Do you have the artist's permission to modify and pass on their work?
If it's just for you then go hog wild. If you're planning to use the modified art commercially or post it online publicly you should get the artist's permission first.
A lot of these machine learning models have been trained on art without their consent.
The entire AI art industry is basically rich megacorps exploiting small artists (who usually don't make much income) to fuel their ever growing profit machines.
Ever heard of open source models? Stable Diffusion was good before they decided to become irrelevant by not open sourcing their models anymore. But the old models (and derivatives of them) are still there.
From the newer ones there's Flux.
And if you want more power to the people, feel free to join AI Horde (for example through HordeNG), a cluster of people hosting AI workers for others, so that everyone has free access to open source text and image generation, regardless of their social status.
Strictly speaking on ethics, if it's for some educational purposes then it's fine. If it's for the educational purposes of making a profit, then it's not fine.