My understanding is you will be subject to San Francisco's rent control ordinance if you rent out the downstairs unit. See this link...
https://sf.gov/information/par...
To quote,
"A single-family dwelling with a legal in-law unit constitutes a two-unit building and is not exempt from the Ordinance. A single-family dwelling with an illegal in-law unit also constitutes a two-unit building and is not exempt, unless both units are rented together as a single tenancy."
and
"A house occupied by an owner who rents out more than one room as separate rental units, in a situation akin to a boarding house, may not qualify for exemption as a single-family dwelling."
Given the situation you described, you will not look like a bad person for evicting this kind of family member. Per this link, you have "just cause" for eviction in San Francisco,
https://sf.gov/information/ove...
So I would personally look for a lawyer to help me get them out. It may cause you some upfront financial pain but will be worth it in the long run so you can move onto renting out the rest of the house in a manner that you want.
Finally, you should consider joining this group. $100 for a year will get you access to monthly meetings with other members who own small rental properties... who could offer you advice. You will also get to use their their standard form lease especially written to cover San Francisco's rental environment.
https://www.smallprop.org/