Entirely up to you. Im sure the roommate you signed the lease with will understand. There is no “punishment” for this.
Just be aware of costs involved. Where I live, you break your lease and they require the full amount remaining on the lease. It sucks.