If your routine calls for indoor workouts, the largest gym with fitness classes, personal trainers and a swimming pool in the Inner Sunset is UCSF's Millberry Fitness Center on Parnassus. If you just need the basics like a treadmill and weights, the Sunset Gym on 9th Ave is a small, but very convenient if you live near the 9th and Irving corridor.
Part of the draw of the Inner Sunset is the neighborhood's close proximity to Golden Gate Park. If you enjoy the outdoors and are up for a challenge, you can ditch the gym altogether (which is what I did several years ago) and check out BootcampSF.com. They have several morning and afternoon classes and meet in Golden Gate Park at the Sharon Meadows parking lot.
Hope that helps!! I've tried them all, so let me know if you have any questions!