Skip to content

Commit d70e6c8

Browse files
author
IrisRainbowNeko
committed
update docstr
1 parent 307a49c commit d70e6c8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/diffusers/loaders/single_file_model.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ def from_single_file(cls, pretrained_model_link_or_path_or_dict: Optional[str] =
240240
revision (`str`, *optional*, defaults to `"main"`):
241241
The specific model version to use. It can be a branch name, a tag name, a commit id, or any identifier
242242
allowed by Git.
243+
low_cpu_mem_usage (`bool`, *optional*, defaults to `True` if torch version >= 1.9.0 and
244+
is_accelerate_available() else `False`): Speed up model loading only loading the pretrained weights
245+
and not initializing the weights. This also tries to not use more than 1x model size in CPU memory
246+
(including peak memory) while loading the model. Only supported for PyTorch >= 1.9.0. If you are using
247+
an older version of PyTorch, setting this argument to `True` will raise an error.
243248
disable_mmap ('bool', *optional*, defaults to 'False'):
244249
Whether to disable mmap when loading a Safetensors model. This option can perform better when the model
245250
is on a network mount or hard drive, which may not handle the seeky-ness of mmap very well.

0 commit comments

Comments
 (0)