No — inFamous is its own game, a superhero-flavoured action title rather than a Sly Cooper sequel.
Both came from Sucker Punch, which is exactly why the rumour had legs. After years of working on the charming, cel-shaded Sly Cooper series, the studio shipped something tonally opposite: a dark, open-world game about a bike courier who wakes up with electrical powers. That whiplash made people assume it had to be a relabelled Sly 4.
It wasn't. inFamous launched as a new IP in 2009 and became a series in its own right. Sly 4 did eventually happen, much later, and it looked nothing like it.