Pablo Picasso is always Pablo Picasso - or, more likely, just Picasso, the mononym denoting a brand that has almost come to represent the whole of 20th century art.

But his friend Lee Miller is a different matter entirely.

She was an American who morphed into a European then a Briton. Born Elizabeth Miller in 1907 on New York State's Hudson River, she died 70 years later in an East Sussex pile by which time she had become Lady Penrose, at least to the obituary writers. She was a model who became a muse then an artist. She shot fashion for Vogue but also made her name as a war photographer. She was a poised, willowy Yankee beauty who had suffered terrible sexual abuse as a child. She was an insider, a groupie before the term was coined, yet she still managed to look in from the margins, usually from behind a camera lens. Not for nothing did her son Antony Penrose call his memoir The Lives Of Lee Miller.

So she was a woman of different guises and, in some cases, disguises. And in this new exhibition of 100 or so photographs examining her 36-year association with Picasso, we see her in some, though not all, of these roles. We see him too, of course: at work, at play, looking serious, playful, occasionally considerate, usually with a cigarette in his hand and his trousers rolled up, and always always always the centre of attention.

At the heart of the exhibition, at least in the sense that they help justify the entrance fee and add another level of meaning to the "and" bit in the show's title, are two works by him. One is a late self-portrait and a present to Miller; the other is a portrait of her, painted in mid-1937 soon after the pair had met. The photographs in the first and most beguiling section of the exhibition document this golden summer, in which Miller and Surrealist painter Roland Penrose (later her second husband) travelled to Mougins in the south of France. Picasso was in residence there along with his lover Dora Maar, the poet Paul Eluard and his wife Nusch, Miller's ex-lover Man Ray and his current squeeze Ady Fidelin, a dancer from Gaudeloupe. Also present was the Anglo-Scottish painter Eileen Agar.

Photographed individually and as a group, they ooze youth, beauty, glamour, a certain mystery and - Picasso anyway - an undeniable virility. In one famous shot included here, we see an outdoor picnic near Cannes in which the women are topless: Paul and Nusch Eluard kiss for the camera, Ady Fidelin sits back and laughs, Penrose tries to look sophisticated and worldly-wise but, ever the Englishman, can't quite hide his excited embarrassment. And Man Ray? He looks impishly into the lens. (We know from other pictures of the same scene not included here that Miller, who was holding the camera, was also topless. Penrose took those shots and in them Ray's stare is more of a glower than a wink, hinting at the rivalries within the group).

Miller and Penrose were lovers by this point, and Miller also formed close bonds with the other women, particularly Dora Maar, who had recently photographed Picasso at work on Guernica, his masterpiece. Miller's close-up portrait of Maar is one of the most powerful images in the exhibition. But Miller had an effect on Picasso too. He painted her six times over the course of that summer and, at least to the mind of Miller's biographer Carolyn Burke, in the only one which shows her below the waist he represents her vagina as a camera lens. It's not the one on show here but, true or not, Miller clearly fascinated Picasso and in her portraits of him you can see his cool gaze judging her as an artistic subject and, possibly, a future lover.

The exhibition moves chronologically, so the carefree pre-war days give on to the years of conflict in Europe. Here the images are starker, many of them interior shots lit by cold flash. We see Picasso and Miller in his studio at Rue des Grands-Augustins in Paris in 1944, her in what looks like military uniform. She went there with fellow photographer Robert Capa to document the liberation of the city and would later recall how Picasso was so pleased to see her that he ruffled her hair and pinched her bottom.

Later images taken throughout the 1950s capture Picasso on a visit to Miller and Penrose's Sussex home, and in residence in Villa la Californie, the spacious house he bought near Cannes in 1953. Images from the 1960s and from 1970 catch him in his studio in nearby Mougins. He died in 1973, four years before Miller.

The exhibition which bears both their names is essentially a documentary show, then. There's little sense of the artistry Miller brought to her work or even her skill as a portraitist: a couple of her more poised studies of Picasso are stand-outs but many have a casual, behind-the-scenes feel. That's deliberate, of course, and has its charm. It also brings a welcome intimacy to the subject - or one of them, anyway. Although very few of the images are unpeopled, we sense rather than see Miller herself. Under glass in a display cabinet is the famous shot of her in Hitler's bath in Munich in 1945 but perhaps the most telling is a self-portrait taken at Villa la Californie in 1956. In it, she's wearing false glasses and a huge comedy nose. You can tell it's her, but only just.

Lee Miller And Picasso is at the Scottish National Portrait Gallery, Edinburgh until September 6