AI can't replace a good photographer, but the masses don't care about that. Companies will invest in AI, they will produce cheap AI garbage by the dozens. There are things we should keep in mind about AI that I haven't mentioned. I can guarantee you that AI will force a good number of photographers to stay on the sidelines permanently.
However, this is more due to their own decisions than to the rise of AI. We can't close our eyes and wait for it to go away. AI is here to stay and will significantly influence the photography industry. The question is: will you be the one who closes your eyes wishing that AI will disappear, or will you adopt it and adapt your skills and business model to the changing landscape?In short, if your main goal with photography is to make money, there's a chance that AI will change your career; it really depends on the type of work you do.
Even so, for most professional photographers, aside from advertising photographers, I wouldn't worry for the time being. Few people would want a computer algorithm (which didn't even exist) to imagine their wedding from scratch or to invent the winning moment of a soccer game based on a description of that moment. There are real reasons to worry about artificial intelligence, but aside from a few specific subgenres, making photography obsolete isn't one of them. There will always be room for wedding photographers, real estate photographers, high school portrait photographers, and most other types of photography that make decent money today. I hope that video will be the real goal of AI in the future, not photography, but photography is a cheap way to prepare for a global image.