As GodErnst mentioned, 2 hours is safe.
If you arrive SFO before 9 am, zip through Immigration and Customs without any check-in luggage, the 1st security line from International terminal to domestic terminal is empty, you can probably do it in half hour from international gate to your domestic gate.