I believe the title character in Frank was based mainly on Daniel Johnston (a cult American singer songwriter with mental health issues) while the lengthy recording sessions segment was inspired by stories of Captain Beefheart holing up with his band to develop Trout Mask Replica.
Apart from the facts the script is written by Jon Ronson (who served time playing keyboards in Frank Sidebottom's band), the title character is a singer songwriter called Frank who wears Frank Sidebottom's head, and events are seen from the viewpoint of a keyboard player called Jon who joins the band more or less by accident just as Jon Ronson did Sidebottom's band, the film has nothing to do with the life or music of Frank Sidebottom (himself a character created by Chris Sievey)
It's a tad confusing innit? Personally I enjoyed Frank on its own merits, but I'd much rather they'd made a film about the actual Frank Sidebottom. Though I guess the American film industry would never fund that.
As an aside, in 1990 I saw Sidebottom play a gig at a pub in London, which I think was around the time Ronson was with his band. He did have a keyboard player in the backing band, but he also played a little cheap Casio keyboard (basically a toy) himself, which served as the lead instrument. It was a slightly odd gig in that half the people were there to see Frank while the other half were obviously pub regulars who didn't have the faintest idea who he was!