Years ago, the center of the action in "Silicon Valley" was actually in the geographical valley, in the south bay. The south bay is way different from SF - safe and sterile. Some people would move up to SF and commute all the way down to the south bay just because they wanted to live somewhere interesting. Those sort of people also tended to be the sort to start startups, and the center of the action gradually moved to SF.
I think SF can try following the same path a second time, focus on catering to the gritty hipster demographic and hope something valuable grows out of it. Added housing to push rents lower seems like a good start.