As in chess, titles are gender free: a teacher can, of course, ask to be called whatever he or she wishes. The default would be last name followed by “Shifu” (which might be pronounced as “Sifu”, depending on the teacher’s preferred dialect). I am reliably informed that addressing anyone as Grandmaster implies being old, so some caution is required.
A female teacher’s husband would be referred to as Shizhang. 師丈.
A male teacher’s wife would be called Shimu. 師母
I don’t yet know the protocol for registered domestic partners and so on.