Streamlit image display stuck in HF space?

hi all,

I have a streamlit app to detect object and process frame by frame and then display as a video, it is running smoothly in my local(with cpu) and the code that do this is "
st.image(frame_as_bytes, channels=“BGR”, use_column_width=True, output_format=“auto”) so the video itself is acutally a sequence of images so this is the way to display it in ‘real-time’

However, after i deployed it into HF Space with a GPU, even from the log i can see the influence is 5 times fater than cpu, the video part is kind of stucked, it stucks for a while when then jump to the last a few frame/image.

I am not really understand but is this related to how HF space is hosted? or network latency from the sapce?
Thank you