Ed Sheeran slept on Jamie Foxx's sofa for six weeks.

The 'Django Unchained' star has revealed the 'Shape Of You' hitmaker lived on his couch for over a month when he was trying to break into the music industry.

He said: ''I had Ed Sheeran sleep on my couch for six weeks. Before he made it, he came to my crib. So did Anthony Hamilton, Nick Cannon, all these [people]. You gotta press anybody that's got that artistic feel, that touch, you've got to lift them up.''

And actor and budding musician Ansel Elgort praised Jamie for being ''so supportive''.

He told Entertainment Tonight: ''He really spreads the love, and he's so supportive of everything. As a young actor walking onto this set - and this goes for Jon as well - I was so excited to do this movie, but I didn't expect any kind of relationship with these guys, where they would be so supportive. [But] they've become mentors.

''He invited me to his house and said, 'Come to the studio, I want to hear your music.' He's been so supportive through everything and it's just awesome because it made this process so much more fun.''

Meanwhile, Ed previously admitted he sees songwriting as ''a form of therapy''.

He explained: ''I think it [songwriting] is a form of therapy to be honest. I think any time I've ever got down or ever felt low the one thing that picks me up from that is writing a song about it because at least you've got a positive experience out of a bad experience ...

''I try to write as much as possible. And you know 12 out of 100 might be good. So I write a bunch and scrap a bunch.''