Enable multi-thread weight loading by default (#20289)
This commit is contained in:
@@ -479,7 +479,7 @@ class DefaultModelLoader(BaseModelLoader):
|
||||
) -> Generator[Tuple[str, torch.Tensor], None, None]:
|
||||
"""Get an iterator for the model weights based on the load format."""
|
||||
extra_config = self.load_config.model_loader_extra_config
|
||||
use_multithread = extra_config.get("enable_multithread_load", False)
|
||||
use_multithread = extra_config.get("enable_multithread_load", True)
|
||||
hf_folder, hf_weights_files, use_safetensors = self._prepare_weights(
|
||||
source.model_or_path, source.revision, source.fall_back_to_pt
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user