Fix ``TypeError`` for dimension of ``inpaint_mask``