Use your imagination against your imagination
Roughly six months ago, I watched a particularly riveting porn scene (please God, that was the last one). I could not get the images out of my mind. Whenever I shut my eyes, there they were.
Then I remembered from when I was young and scary thoughts/images would frighten me. I was sent the idea that "Hey, if they are in my mind, that means I can manipulate them to look how I want." So I'd put a clown nose and a tutu on the monster and his scariness vanished.
Fast-forward 30 years, why not use my imagination here as well? So I did the opposite; I made the porn scene as scary and horrific looking as possible (which I thought was apropos, since that is what is really happening behind the illusion!) Now, whenever that scene pops up in my mind, I use my dimyon to turn it around (or reveal what it really is). Needless to say, the attraction has vanished.
I heard Rabbi Shafier on The Fight say something similar regarding women other than my wife. I would not be attracted to an animal, so why am I attracted to this other woman? Both strategies are ways to reframe what I find attractive to take the allure out of it.
I would mention that a number of years ago, my wife showed me a video about how an average looking lady was transformed into a supermodel using computers - her "beauty" was not real at all!