Is it worthwhile for my Mastermind to dip into spellcasting for Shadowblade?

I am playing a Mastermind rogue in a campaign I do not expect to last beyond 6th level. I am interested in acquiring spellcasting ability of some sort, primarily for Silent Image (1st level) and Shadowblade (2nd level).

Does taking 2-3 levels in Wizard (or another caster class) make up for the loss in rogue levels? (As far as damage + utility) I know that if I take War Mage, I’m losing out a potential 1d6 of Sneak Attack Damage, an ASI, and Uncanny Dodge in exchange for Arcane Deflection, and initiative bonus, and Level 2 spellcasting.

Oftentimes, I hear that rogue’s progression is so linear that it never makes sense to stop taking rogue levels. Are there any alternative goodies I could pick up in a max level 6 campaign?