Depends on the home port rules and your citizenship. And generally if you divert from the travel arrangements the company gives you, you have to pay for your own ticket home
If the home port is in the US and you're a US citizen, no problem. If not US, you have to fly out of the country (as you need a C1-D seamans visa to enter and work on the ship), your C1-D is cancelled and you'd have to re-enter on a tourist visa.
For other countries home port/citizenships, it really depends on the individual countries rules