Add layer offloading to omni captioner

This commit is contained in:
Jaret Burkett
2026-08-13 07:21:54 -06:00
parent a69f3e8710
commit 6c88e3d138
6 changed files with 136 additions and 12 deletions

View File

@@ -50,6 +50,10 @@ class CaptionConfig:
# safety; raise it to saturate a large GPU.
self.batch_size = kwargs.get("batch_size", 1)
self.num_workers = kwargs.get("num_workers", 3)
# stream weights from CPU per layer instead of keeping them resident
# (low-vram machines); percent is the fraction of linears offloaded
self.layer_offloading = kwargs.get("layer_offloading", False)
self.layer_offloading_percent = kwargs.get("layer_offloading_percent", 1.0)
class BaseCaptioner(BaseExtensionProcess):