So I'm in a band and my bassist and I made a cool song, and I have almost all the solo down, it's just this one part where I make it fast and I can never remember what I played! I just improvise and it's sweet, but I can't remember any of it I have a teacher who can listen to a song and immidiately knows what the note is if that helps at all.
Try to slow it down and take it a few notes at a time. Then afeter a couple of runs ad on a few more notes and repeat. Then speed up the tempo.