Internal fregmentation will occur in the last frame.
Say i have my Process of 20 kb and my page size is 4kb,then my process will fit nicely in 5 frames.Now if my process is more than 20kb then i have to allocate new frame.Best case will be i will fully use that new frame,and worst case is i will store only 1 byte in that frame.
So maximum internal fregmentation possible is FrameSize-1
In you case it will be 1024-1=1023