When evaluating a major lifestyle change for financial benefit with a job shift, I asked a coworker who'd been doing the job awhile. He gave me the best advice I've ever received when moving into a high-stress / high-paying job.
"It's good money. But make sure you set up your finances so that when you decide to stop, you can. Even when they say 'What if we paid you twice as much to keep doing the job?' Otherwise, you'll still be doing the job when you're 60."
The corollary is probably: don't take a job you don't want to do, unless the pay's good enough that you can reach the above point in a reasonable amount of time.
I listened, and it gave me the opportunity to quit a well paying consulting job to be with my mother while she was going through cancer surgery. (Thankfully, it and her recovery went well)
And ultimately, led me to finding a job that was a much happier fit.
A third time (joining an early stage startup as a late founder) 6 months would have been a decent contingency if it went under fast, 12 if it withered away slowly. (Also caught a lucky break on that one and had a soft landing.)
Once (walking away from a bad job and looking for one that was a stretch), 6 months would have been plenty because if the gamble didn’t work out I knew I could reset my sights lower after a few months of looking and be employed somewhere within 6 weeks.
So the answer is very much “it depends on the circumstances”.