My partner and I will routinely "ruin the moment" with stupid jokes and off topic thoughts. It hasn't ruined our relationship yet.
You could theoretically just excersise more conscious control over what you say, but that often leads to exhaustion/burnout. It's so much better to find someone who understands you, and who you can relax and be yourself around.