def reload_script_model(module):
    """
    Save a jit module and load it back.
    Similar to the `getExportImportCopy` function in torch/testing/
    """
    buffer = io.BytesIO()
    torch.jit.save(module, buffer)
    buffer.seek(0)
    return torch.jit.load(buffer)

    Save a jit module and load it back.
    Similar to the `getExportImportCopy` function in torch/testing/
    
video_chat_with_MOSS/models/grit_src/third_party/CenterNet2/detectron2/utils/testing.py