misc: speedup load safetensors (#1319)

Co-authored-by: ispobock <ISPObaoke@163.com>
This commit is contained in:
Yineng Zhangandispobock authored and GitHub committed 2024-09-04 04:29:53 +10:00
1 parent 1e495e0847
commit dc67d97693
1 file changed
+1
@@ -162,6 +162,7 @@ class ModelRunner:
return min_per_gpu_memory
def load_model(self):
torch.set_num_threads(1)
logger.info(
f"Load weight begin. avail mem={get_available_gpu_memory(self.gpu_id):.2f} GB"
)