[Performance] Replace preprocess_video logic from GLM multimodal processor with transformer impl for speed up (up to 27% faster) and addressing OOM (up to 50x improvements) (#13487)

This commit is contained in:
Binyao Jiang
2025-11-24 18:17:13 -08:00
committed by GitHub
parent 4b45d556a7
commit de430b6745
3 changed files with 6 additions and 44 deletions

View File

@@ -63,6 +63,8 @@ dependencies = [
"timm==1.0.16",
"torch_memory_saver==0.0.9",
"torch==2.8.0",
"torchcodec==0.7.0 ; sys_platform != 'linux' or (sys_platform == 'linux' and platform_machine != 'aarch64' and platform_machine != 'arm64' and platform_machine != 'armv7l')", # torchcodec does not exist in those systems. If not provided, transformer will use torchvision instead by default.
"av ; sys_platform == 'linux' and (platform_machine == 'aarch64' or platform_machine == 'arm64' and platform_machine == 'armv7l')",
"torchaudio==2.8.0",
"torchvision",
"torchao==0.9.0",
@@ -89,7 +91,6 @@ diffusion = [
"moviepy>=2.0.0",
"cloudpickle",
"remote-pdb",
"torchcodec==0.5.0",
"st_attn ==0.0.7",
"vsa==0.0.4",
]