Skip to content

vllm_omni.diffusion.ipc

IPC utilities for transferring large tensors via POSIX shared memory.

Used by Hop1 (GPU worker <-> scheduler) to avoid pickling large video tensors through the MessageQueue. Tensors above _SHM_TENSOR_THRESHOLD are copied into a named shared-memory segment; only a lightweight metadata dict is serialised through the queue.

pack_diffusion_output_shm

pack_diffusion_output_shm(output: object) -> object

Replace large tensors in diffusion worker outputs with SHM handles.

Supports either a bare DiffusionOutput or a wrapper object carrying one in .result (for example RunnerOutput).

unpack_diffusion_output_shm

unpack_diffusion_output_shm(output: object) -> object

Reconstruct tensors from SHM handles in diffusion worker outputs.